Scrape Facebook Public Group Posts without using Facebook API using Selenium.
- Scrape text from Public Group Posts
Please make sure Firefox is installed and geckodriver is available.
pip install -r requirements.txt
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("@","")))
- Please use this code for Educational purposes only