Automated scraping of facebook events info and images inside Kathmandu, Bhaktapur and Lalitpur, Nepal using beautifulsoup and selenium through eventScrape.py. A csv file with events info and a folder with images will be created as output in the script's directory
- Python >=3.6
- pip
python -m venv ./.venv/fb-events
source .venv/fb-events/bin/activate
Install python requirements and download geckodriver:
pip install -r requirements.txt
Download and setup geckodriver with setup.sh
. E.g.,
sh setup.sh -v 32 -s macos
NOTE: MacOS is uneffected by specified version
Next step is system specific:
[MacOS/Linux]
Copy geckodriver to /usr/bin
:
cp ./geckodriver /usr/bin/
[Windows]
Set your path variable to geckodriver.exe
as it is described here
Start script eventSceape.py
by specifying year
and month
. E.g.,
python eventScrape.py --year=2019 --month=1
Script work in background by default. To use it in foreground add argument --visible
.
python eventScrape.py --year=2019 --month=1 --visible