While facebook removed his events API, retrieving data became difficult. This library is crawling Facebook, and parsing all data from the UI. Sometimes that fails, so you need to be fault tolerant :)
- Create a new non-used facebook account
- Change the language to English/US! (That's important!) (https://www.facebook.com/settings?tab=language)
- Create a new mysql database
- Import the database.sql file
- Add some page ids to the pages database table (the page id is on the link, for example facebook.com/PageId)
- Copy CONFIG_DEFAULT.py to CONFIG.py
cp CONFIG_DEFAULT.py CONFIG.py
- Fill the empty fields below
- Run! All records will be inserted to the 'events' table!
If you need latitude and longitude codes for event places, use my Geo Cache library. This library is included as a submodule, so you just need to pull it (more):
cd Facebook-event-crawler
git submodule update --init --recursive
- Setup the local or remote server
- Setup Geo-cache/CONFIG.php
- Edit Facebook-event-crawler/CONFIG.py
Enjoy!
Want to contribute? Great! Please test a lot, before sending your pull request :)
This crawler is not too universal, so if you need to crawl anything else, I would recommend these:
Crawler | No coding required | Login feature | Open source & self hosted |
---|---|---|---|
Scrapy | ✓ | ✓ | |
ParseHub | ✓ | ✓ | |
Simple Scaper | ✓ | ? |