Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harrypython/fb-regex-scraper
Scrape Facebook Public Group Posts without using Facebook API using Selenium.
https://github.com/harrypython/fb-regex-scraper
Last synced: about 2 months ago
JSON representation
Scrape Facebook Public Group Posts without using Facebook API using Selenium.
- Host: GitHub
- URL: https://github.com/harrypython/fb-regex-scraper
- Owner: harrypython
- License: gpl-3.0
- Created: 2020-11-20T17:19:37.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T17:33:10.000Z (about 4 years ago)
- Last Synced: 2024-08-09T13:13:07.959Z (5 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Facebook Regex Scraper
Scrape Facebook Public Group Posts without using Facebook API using [Selenium](https://seleniumhq.github.io/docs/).
## What It can Do
- Scrape text from Public Group Posts
## Install Requirements
Please make sure Firefox is installed and [geckodriver](https://github.com/mozilla/geckodriver) is available.
```sh
pip install -r requirements.txt
```## Usage
```python
from Scrape import Scrapescraper = 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