Skip to main content
https://readthedocs.org/projects/google-alerts/badge/?version=latest https://badge.fury.io/py/google-alerts.svg https://img.shields.io/badge/License-MIT-yellow.svg

The google-alerts Python module provides an abstract interface for the Google Alerts service. Google does not provide an official API for this service, so interactions are done through web scripting.

Quick Start

Install the library:

pip install google-alerts or python setup.py install

Save your configuration:

google-alerts setup --email <your.mail@foo.com> --password 'password'

Create a monitor:

google-alerts create --term "hello world" --delivery 'rss' --frequency 'realtime'

List monitors:

google-alerts list

Delete a monitor:

google-alerts delete --id '89e517961a3148c7:c395b7d271b4eccc:com:en:US'

Sample Code

This sample code shows some of the range of functionality within the module:

from google_alerts.google_alerts import GoogleAlerts

# Create an instance
ga = GoogleAlerts('your.email@gmail.com', '**password**')

# Authenticate your user
ga.authenticate()

# List configured monitors
ga.list()

# Add a new monitor
ga.create("Hello World", {'delivery': 'RSS'})

# Modify an existing monitor
ga.modify("89e517961a3148c7:c395b7d271b4eccc:com:en:US", {'delivery': 'RSS', 'monitor_match': 'ALL'})

# Delete a monitor
ga.delete("89e517961a3148c7:c395b7d271b4eccc:com:en:US")

Example Output

Below is an example monitor:

[{
    "term": "hello world",
    "user_id": "09738342945634096720",
    "language": "en",
    "monitor_id": "89e517961a3148c7:c395b7d271b4eccc:com:en:US",
    "region": "US",
    "rss_link": "https://google.com/alerts/feeds/09738342945634096720/9663349274289663466",
    "delivery": "RSS",
    "match_type": "BEST"
}]

Features

  • Add new monitors (RSS or Mail)

  • Modify existing monitors

  • Delete monitors by ID or term

  • List all monitors with details

Changelog

07-10-18

  • Feature: Added the ability to set the frequency when creating alerts

  • Bugfix: Fixed frequency settings when using the mail delivery method

05-30-18

  • Change: Explicitly detect when a CAPTCHA is being thrown

05-28-18

  • Feature: Take advantage of the config file concept inside of the class

  • Feature: Authenticate users with a session file if it’s available

  • Change: Tell Chrome to avoid using Javascript so we get the old form

05-25-18

  • Change: Added headers to all calls to look like less of a bot

  • Bugfix: Wrapped a problem area when inspecting the forms in a page

  • Bugfix: Handled setup error for Python3

04-29-18

  • Feature: Allow users to setup exact match queries

  • Change: Added support for Python3

  • Bugfix: Removed extra calls causing an error in the decrypt process

04-26-18

  • Feature: Added a command line utility to the code for easy testing

  • Bugfix: Removed clobbering error inside of delete routine

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google-alerts-0.1.8.tar.gz (9.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

google_alerts-0.1.8-py3.6.egg (26.8 kB view details)

Uploaded Egg

google_alerts-0.1.8-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

google_alerts-0.1.8-py2.7.egg (27.2 kB view details)

Uploaded Egg

File details

Details for the file google-alerts-0.1.8.tar.gz.

File metadata

  • Download URL: google-alerts-0.1.8.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for google-alerts-0.1.8.tar.gz
Algorithm Hash digest
SHA256 206ea79e95fb8b529cfa778299d75fdf35869a6469793abc59d61489f4786ca9
MD5 a0604e30c607d02383b1bd190275e7e1
BLAKE2b-256 c7b99792f29c233db5f4aa2db94dab5e4b57096390d76e53b641e9fea294ae5c

See more details on using hashes here.

File details

Details for the file google_alerts-0.1.8-py3.6.egg.

File metadata

  • Download URL: google_alerts-0.1.8-py3.6.egg
  • Upload date:
  • Size: 26.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.10

File hashes

Hashes for google_alerts-0.1.8-py3.6.egg
Algorithm Hash digest
SHA256 dac92c14ec0b5d0bc7e7285327008aaa2668a0fb147b5f5bd7340414788627fe
MD5 43aab14ed96071d07855538b79652df0
BLAKE2b-256 dfda2d85f166a907f8231729974249b38357e5b6cce74322daae9d939d165f6f

See more details on using hashes here.

File details

Details for the file google_alerts-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for google_alerts-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 97c5a4c1353e2314cf26637f40de872fe89abf5aa78b30a2d80da0b164d2d4c8
MD5 65620581b8a7b324d2b2f18321b34a98
BLAKE2b-256 893e04f1bbbaab78e0775f32fc17c38fd9ce88b7bd7042925f14d9a1b3dff6ee

See more details on using hashes here.

File details

Details for the file google_alerts-0.1.8-py2.7.egg.

File metadata

  • Download URL: google_alerts-0.1.8-py2.7.egg
  • Upload date:
  • Size: 27.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.10

File hashes

Hashes for google_alerts-0.1.8-py2.7.egg
Algorithm Hash digest
SHA256 242ab2e18952d8228f059111a614979e1018522085cf55ce69bb454c0b3a24eb
MD5 2f48d8aa815fdc5361d2e00a1b118470
BLAKE2b-256 e404437844334dfa393dd99b40ab56a36562dc42f6f0b97314214078d8d3d0ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page