def _get_site(self, url, headers, cookies, timeout, driver_args, driver_kwargs):
try:<EOL><INDENT>response = self.driver.get(url,<EOL>*driver_args,<EOL>headers=headers,<EOL>cookies=cookies,<EOL>timeout=timeout,<EOL>**driver_kwargs)<EOL>self.status_code = response.status_code<EOL>self.url = response.url<EOL>self.response = response<EOL>if response.status_code == requests.codes.ok:<EOL><INDENT>return response.text<EOL><DEDENT>response.raise_for_status()<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise e.with_traceback(sys.exc_info()[<NUM_LIT:2>])<EOL><DEDENT>
Try and return page content in the requested format using requests