response = requests.get(_GOOGLE_TRENDS_URL % term)
if response.status_code == requests.codes.ok:
    data_line = [l for l in response.content.splitlines() if 
        'var chartData' in l][0]
chart_data = re.sub('.*var chartData = (.*?);.*', '\\1', data_line)
chart_data = re.sub('new Date\\((\\d+), (\\d+), (\\d+)\\)', '"\\1-\\2-\\3"',
    chart_data)
data = json.loads(chart_data)
for row in data['rows']:
    if '2013' in row[0]['v']:
        print('%s: %d' % (row[0]['f'], row[3]))
else:
    print(response.status_code)
print(response.text)
Как войти в Google с модулем Python Requests?