Code Monkey home page Code Monkey logo

boo283 / facebook_comment_crawler Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 26 KB

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

Python 100.00%
facebook facebook-comments-scraper facebook-crawler selenium web-scraping-python crawl-facebook facebook-comment-crawler

facebook_comment_crawler's Introduction

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 ❤️❤️❤️

facebook_comment_crawler's People

Contributors

boo283 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.