For a personal project, I needed a simple tool capable of scraping all posts from a public Facebook page and upload them as post in a personal Wordpress website.
Made in Python and using Wordpress REST API, I wrote this quick and dirty code 😄. And it works!
Check it out and let me know how I can improve it.
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
.envfile based on
- Install the requirements using pip.
pip install -r requirements
- Scrape all posts from a page using Facebook Scraper.
- Download them as a single CSV file
- Inspect and get that CSV ready for upload
- Upload every post using Wordpress REST API.
- Python >= 3.x