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

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page