Skip to main content
https://readthedocs.org/projects/google-alerts/badge/?version=latest https://badge.fury.io/py/google-alerts.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'

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 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

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.0.tar.gz (6.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.0-py3.6.egg (14.4 kB view details)

Uploaded Egg

google_alerts-0.1.0-py2-none-any.whl (7.3 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for google-alerts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb19de5dad08fd257cad054556b15fce3ad722ee04b82a6762cb793193aea607
MD5 5423ba9f36525282c4720857a079156c
BLAKE2b-256 cf58a928abdcbb3c9da67009f6ca05ec858560a7edf733adadaeebe36f363c03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_alerts-0.1.0-py3.6.egg
Algorithm Hash digest
SHA256 b3c728e8bcc3e74891abf2639e9fa5e7115d0849c0f7e468693c6f4d914bb3a6
MD5 50d936786888cd62226994746f7723df
BLAKE2b-256 cf5b68f7732d8353d2a9ad0375442238fa82b369b2aee3ef906835079ea5f336

See more details on using hashes here.

File details

Details for the file google_alerts-0.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for google_alerts-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 465168072700a6b5f55131a79f03d2a0f76969f949cda2864f999a88cbc0ca9f
MD5 c9ae4bc00f5d5a137c540d4591acbc7f
BLAKE2b-256 d82592b76f9a81c5f9571072aa948d64cdc8d75b28e4c347a29d9554b2ea5cc2

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