Fbtxtscraper is a tool for scraping your personal Facebook conversations, written in python, based on the Scrapy framework.
Fbtxtscraper is based on Python Web Scraping framework Scrapy. For simple beginner understanding items, pipeline, middleware were not used, contents are directly written to csv. From this, we can scrape out our facebook conversation with our friends, and store it structured.
-
Why scraping??? It's super boring to scroll through conversations every time.
-
Why not FB API?? We can't get whole of the contents, There is a cap for it.
-
Why python??Scrapy?? For Web scraping Scrapy is the widely used framework for its numerous advantages over its counterparts like Suitable for broad crawling and scaling, Easy setup and detailed documentation, Active Community and Superfast.
Requirements are python3 (python2 is also supported), scrapy and other dependencies libraries (twisted, libxml2 etc.). Installazion guide for scrapy.
Make sure that scrapy is installed and clone this repository. Navigate through the project's top-level directory and launch scrapy with:
scrapy crawl fb -a email="EMAILTOLOGIN" -a password="PASSWORDTOLOGIN"
This will give last 10 recent conversations, from that select the conversation to be scraped, bot will scrape till very last text in that conversation and return a csv file with columns Name, Text, Date.
To scrape every conversation, Then public post's reactions and comments with replies.
New to scraping ??? Check Here for intro and available tools across languages.