Skip to main content

Get notified by email whenever a Facebook page adds a new event.

Project description

ihatefacebook

ihatefacebok is a Python script that allows you to get notified by email whenever a Facebook page adds a new event, without having to interact with Facebook yourself. The script runs by default every time your machine starts up (after login), but you can also set it up with the run command as a cron job. Currently supports macOS only.

Installation

$ pip install ihatefacebook

Usage

$ ihatefacebook COMMAND [OPTION] [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  config  Add or list email and SMTP server configurations
  page    Add, remove or list pages to be scraped for events
  run     Run scraping utility with currently set configurations and pages

Subcommands

$ ihatefacebook config OPTION [ARGS]

  Add or list email and SMTP server configurations

Options:
  -a, --add key=value   Add user.email, smtp.host, smtp.port configurations, with
                            the format key=val
  -p, --password        Set password for the user.email added using the -a option
  -l, --list            List currently set configurations
  --help                Show this message and exit.
$ ihatefacebook page OPTION [ARGS]

  Add, remove or list pages to be scraped for events

Options:
  -a, --add PAGE_ID     Add a page to the list of pages to be scraped, using its
                            Facebook page ID
  -r, --remove PAGE_ID  Remove a page using its Facebook page ID
  -l, --list            List all pages from the list of pages to be scraped
  --help                Show this message and exit.

Requirements

pip installs needed dependencies but you'll need to have these on your machine as well:

  • Google Chrome
  • ChromeDriver, make sure it's the version corresponding to that of the browser, and have it located in /usr/local/bin/.

Notes

  • The scraping code could break anytime Facebook change their DOM, if you notice this before I update the code, please let me know.
  • If you're using Gmail as your SMTP server, you'll need to turn on less secure app access.
  • The script uses launchd on macOS for launching every time your machine starts up, ihatefacebook calls launchd and adds needed configuration at installation. However, you wanna check the status of the script in launchd to make sure it'll work properly. This can be done using launchctl list | grep ihatefacebook (or use LaunchControl), 0 means OK. Check ~/Library/Logs/com.hot3eed.ihatefacebook/log.error (or use Console) for debugging. All this hard manual labor could be automated in a future update.

TODO

  • Add Linux support.
  • Add Windows support.

License

Apache License 2.0

Project details


Release history Release notifications | RSS feed

This version

0.5

Download files

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

Source Distribution

ihatefacebook~-0.5.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file ihatefacebook~-0.5.tar.gz.

File metadata

  • Download URL: ihatefacebook~-0.5.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for ihatefacebook~-0.5.tar.gz
Algorithm Hash digest
SHA256 cb0bbcfde99fddf2f38b2d2d5684886d419ea52b9f05c2c46b1102bd698b39be
MD5 9befff170d6d9f50220e193b6b04b1b1
BLAKE2b-256 21588546ca9316293f1f18c1c9a3cc5d83aaa144dc415ccf807c6c9bc6695f02

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 Pingdom Monitoring Sentry Error logging StatusPage Status page