Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_page_fast(pagerequest):
"""Return the data for a page on scholar.google.com"""
import scholarly
resp = scholarly._SESSION.get(pagerequest, headers=scholarly._HEADERS, cookies=scholarly._COOKIES)
if resp.status_code == 200:
return resp.text
else:
raise Exception('Error: {0} {1}'.format(resp.status_code, resp.reason))