Skip to main content

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

Release files for ihatefacebook 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ihatefacebook 0.5
File Size Uploaded
ihatefacebook~-0.5.tar.gz 9.6 kB Details

Release files / ihatefacebook~-0.5.tar.gz

Download URL ihatefacebook~-0.5.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cb0bbcfde99fddf2f38b2d2d5684886d419ea52b9f05c2c46b1102bd698b39be
BLAKE2b-256 checksum
How to use checksums
21588546ca9316293f1f18c1c9a3cc5d83aaa144dc415ccf807c6c9bc6695f02
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.5 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page