Skip to content

The Facebook Comments Crawler is an unofficial tool for extracting comments from Facebook posts using Selenium in Python. It's designed to aid in academic and personal research. #Facebook comments scaper #Facebook comments crawler

Notifications You must be signed in to change notification settings

boo283/Facebook_comment_crawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FACEBOOK COMMENTS CRAWLER using Selenium in Python

This is the unofficial FACEBOOK COMMENTS CRAWLER in Python. The main purpose is support to my study.

Main Fuction

  • Scrape comments with related information such as:
    • Comment - text
    • User
    • Nametag (like @name_tag)
    • Check if it is spam (based on user-defined demand)

Installation

  • Clone the repository git clone https://github.com/boo283/Facebook_comment_crawler.git
  • Install dependencies: pip install -r requirements.txt

Usage

  1. Clone this repository
  2. Open this repository and add some information:
  • In folder "configuration":
  • In main folder:
    • crawl.py:
      • Just type your Facebook account in the Login info part in main function.
      • Choose your destination to save crawled data
  1. Cd to folder and run script: python crawl.py
  2. Simply enter the Facebook URL post and press Enter

Note

  • You must have a stable connection to ensure that this code run correctly
  • Try to rerun this code if you have any web or driver exceptions
  • Update requirement: Because the html tag will be update monthly(some tag not all of them), so when any function do not run accurately, you just have to open any post and change to developer mode (F12) to look for the name of the parent-html tag of your failed clicking tag. After that, just replace it by the xpath element or css_selector,... They are all located on the config.py and action.py.

Contact:

Feel free to adjust my code, practice makes perfect ❤️❤️❤️

About

The Facebook Comments Crawler is an unofficial tool for extracting comments from Facebook posts using Selenium in Python. It's designed to aid in academic and personal research. #Facebook comments scaper #Facebook comments crawler

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages