Facebook scraper to Wordpress via REST API
Quick tool that I needed to scrap Facebook posts and upload them to Wordpress as posts.
How it works
- Setup your virtual environment and
.env
file based on.env.example
. - Install the requirements using pip.
pip install -r requirements
- Scrape all posts from a page using Facebook Scraper.
python scraper.py
- Download them as a single CSV file
- Inspect and get that CSV ready for upload
- Upload every post using Wordpress REST API.
python uploader.py
Requirements
- Python >= 3.x
References
- This tutorial by Misha Rudrastyh helped a lot.
- TIL that Wordpress needs a user agent to allow requests.