All Projects β†’ brutalsavage β†’ Facebook Post Scraper

brutalsavage / Facebook Post Scraper

Licence: gpl-3.0
Facebook Post Scraper πŸ•΅οΈπŸ–±οΈ

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Facebook Post Scraper

Whatsappbot
Send messages to any person in any time how much you want.
Stars: ✭ 104 (-31.58%)
Mutual labels:  selenium-webdriver
Marionette
Selenium alternative for Crystal. Browser manipulation without the Java overhead.
Stars: ✭ 119 (-21.71%)
Mutual labels:  selenium-webdriver
Java.webdriver
Browser test automation using Selenium WebDriver in Java
Stars: ✭ 135 (-11.18%)
Mutual labels:  selenium-webdriver
Selenium Cucumber Js
Browser automation framework written in pure JavaScript using official selenium-webdriver and cucumber-js
Stars: ✭ 108 (-28.95%)
Mutual labels:  selenium-webdriver
Moon
An efficient Selenium protocol implementation running everything in Kubernetes or Openshift
Stars: ✭ 116 (-23.68%)
Mutual labels:  selenium-webdriver
30 Days Of Python
Learn Python for the next 30 (or so) Days.
Stars: ✭ 1,748 (+1050%)
Mutual labels:  selenium-webdriver
Webdriverextensions
Make your WebDriver based Selenium tests more readable, reusability and maintainable by using WebDriver Extensions!
Stars: ✭ 89 (-41.45%)
Mutual labels:  selenium-webdriver
Webium
Webium is a Page Object pattern implementation library for Python (http://martinfowler.com/bliki/PageObject.html). It allows you to extend WebElement class to your custom controls like Link, Button and group them as pages.
Stars: ✭ 144 (-5.26%)
Mutual labels:  selenium-webdriver
Seleniumcrawler
An example using Selenium webdrivers for python and Scrapy framework to create a web scraper to crawl an ASP site
Stars: ✭ 117 (-23.03%)
Mutual labels:  selenium-webdriver
Chai Webdriver
Build more expressive integration tests with webdriver sugar for chai.js
Stars: ✭ 128 (-15.79%)
Mutual labels:  selenium-webdriver
Hive
lots of spider (εΎˆε€šηˆ¬θ™«οΌ‰
Stars: ✭ 110 (-27.63%)
Mutual labels:  selenium-webdriver
Csharp.webdriver
Browser test automation using Selenium WebDriver in C#
Stars: ✭ 115 (-24.34%)
Mutual labels:  selenium-webdriver
Faitagram
(Doesn't work anymore)
Stars: ✭ 117 (-23.03%)
Mutual labels:  selenium-webdriver
Frameworkium Core
Framework for writing maintainable Selenium and REST API tests in Java.
Stars: ✭ 107 (-29.61%)
Mutual labels:  selenium-webdriver
Instagram Bot
An Instagram bot developed using the Selenium Framework
Stars: ✭ 138 (-9.21%)
Mutual labels:  selenium-webdriver
Sillynium
Automate the creation of Python Selenium Scripts by drawing coloured boxes on webpage elements
Stars: ✭ 100 (-34.21%)
Mutual labels:  selenium-webdriver
Webdrivermanager
WebDriverManager (Copyright Β© 2015-2021) is a project created and maintained by Boni Garcia and licensed under the terms of the Apache 2.0 License.
Stars: ✭ 1,808 (+1089.47%)
Mutual labels:  selenium-webdriver
Ayespy
A performant visual regression testing tool
Stars: ✭ 150 (-1.32%)
Mutual labels:  selenium-webdriver
Selenium extensions
Tools that will make writing tests, bots and scrapers using Selenium much easier
Stars: ✭ 140 (-7.89%)
Mutual labels:  selenium-webdriver
Horn3t
Powerful Visual Subdomain Enumeration at the Click of a Mouse
Stars: ✭ 120 (-21.05%)
Mutual labels:  selenium-webdriver

Facebook Scraper Selenium

Scrape Facebook Public Posts without using Facebook API

What It can Do

  • Scrape Public Post Text
    • Raw Text
    • Picture
    • Link
  • Scrape Likes and Top 3 React Numbers
  • Scrape Public Post Comments
    • Links in Comments
    • Pictures in Comments

Install Requirements

Please make sure chrome is installed and chromedriver is placed in the same directory as the file

Find out which version of chromedriver you need to download in this link Chrome Web Driver.

Place your Facebook login in info into facebook_credentials.txt

Optional: To download all videos from a specific page, make sure that youtube-dl binary is downloaded locally.

pip install -r requirements.txt

Usage

1. Use scraper.py to print to screen or to file

usage: scraper.py [-h] -page PAGE -len LEN [-infinite INFINITE] [-usage USAGE]
                  [-comments COMMENTS]

Facebook Page Scraper

optional arguments:
  -h, --help            show this help message and exit

required arguments:
  -page PAGE, -p PAGE   The Facebook Public Page you want to scrape
  -len LEN, -l LEN      Number of Posts you want to scrape

optional arguments:
  -infinite INFINITE, -i INFINITE
                        Scroll until the end of the page (1 = infinite)
                        (Default is 0)
  -usage USAGE, -u USAGE
                        What to do with the data: Print on Screen (PS), Write
                        to Text File (WT) (Default is WT)
  -comments COMMENTS, -c COMMENTS
                        Scrape ALL Comments of Posts (y/n) (Default is n).
                        When enabled for pages where there are a lot of
                        comments it can take a while

2. Use extract() to grab list of posts for additional parsing

from scraper import extract

list = extract(page, len, etc..)

# do what you want with the list 

Return value of extract() :

[
{'Post': 'Text text text text text....',
 'Link' : 'https://link.com',
 'Image' : 'https://image.com',
 'Comments': {
        'name1' : {
            'text' : 'Text text...',
            'link' : 'https://link.com',
            'image': 'https://image.com'
         }
        'name2' : {
            ...
            }
         ...
         },
 'Reaction' : { # Reaction only contains the top3 reactions
        'LIKE' : int(number_of_likes),
        'HAHA' : int(number_of_haha),
        'WOW'  : int(number_of_wow)
         }}
  ...
]

3. Use download_entire_page_videos to download all videos from a specific Facebook page

Example:

download_entire_page_videos.py --chromedriver chromedriver.exe --youtube_dl youtube-dl.exe --fbpage https://www.facebook.com/groups/[GROUP_ID]/ --numofposts 100

Note:

  • Please use this code for Educational purposes only
  • Will continue to add additional features and data
    • comment chains scraping
    • comment reaction scraping
    • different comment display (Most Relevant, New, etc)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].