Facebook to Wordpress via REST API
Carlos V.

Carlos V. @po5i

About: Software Engineer | Tech Writer and Speaker | Community leader | Amateur photographer | Cats and plants lover

Location:
Ecuador
Joined:
Mar 2, 2020

Facebook to Wordpress via REST API

Publish Date: May 30 '20
6 0

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.

GitHub logo po5i / facebook-to-wp

A simple tool to migrate content from facebook pages to wordpress

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
Enter fullscreen mode Exit fullscreen mode
python scraper.py
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode

Requirements

  • Python >= 3.x

References




Comments 0 total

    Add comment