Skip to content

Scrape Facebook Public Group Posts without using Facebook API using Selenium.

License

Notifications You must be signed in to change notification settings

harrypython/fb-regex-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facebook Regex Scraper

Scrape Facebook Public Group Posts without using Facebook API using Selenium.

What It can Do

  • Scrape text from Public Group Posts

Install Requirements

Please make sure Firefox is installed and geckodriver is available.

pip install -r requirements.txt

Usage

from Scrape import Scrape

scraper = Scrape("webdriver/geckodriver")
 
# pattern to find Instagram profiles. Source: regex101.com/r/uNc8HG/1
my_pattern = "@\w(?:(?:\w|(?:\.(?!\.))){0,28}(?:\w))?"

scraper.set_pattern(pattern=my_pattern)

for r in scraper.get_posts(group="123456789012345"):
    print("https://www.instagram.com/{}/".format(r.replace("@","")))

Note:

  • Please use this code for Educational purposes only

About

Scrape Facebook Public Group Posts without using Facebook API using Selenium.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages