A Python module for easily accessing Google data that sits behind a login.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
tests
.gitignore
__init__.py
correlate.py
dev-requirements.txt
errors.py
hits.py
ngram.py
readme.md
search.py
trends.py
web.py

readme.md

google

A python library for easily downloading data from Google's services that sit behind a login. Currently, this module supports:

  • Google Trends
  • Google Correlate
  • Google Ngram
  • Google search

Quickstart

Fire up a requests session with:

import google
session = google.Session("username", "password")

You can use session like any other requests session and access anything protected by a Google login.

The session object is passed to the classes which automatically handle the different Google services.

Google Trends

To download data from Google Trends:

import google
session = google.Session("username", "password")
trends = google.Trends(session)
data = trends.fetch_trends(q="Linus")

data is a pandas dataframe of the Google Trends time series for "Linus".