{"id":13596675,"url":"https://github.com/brutalsavage/facebook-post-scraper","last_synced_at":"2025-04-05T20:08:18.177Z","repository":{"id":54838178,"uuid":"199939495","full_name":"brutalsavage/facebook-post-scraper","owner":"brutalsavage","description":"Facebook Post Scraper 🕵️🖱️","archived":false,"fork":false,"pushed_at":"2023-01-03T13:41:25.000Z","size":38,"stargazers_count":330,"open_issues_count":31,"forks_count":118,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-29T19:06:32.072Z","etag":null,"topics":["beautifulsoup4","facebook-scraper","facebook-scraper-software","facebook-scraper-tool","python","selenium-webdriver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brutalsavage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-31T22:51:56.000Z","updated_at":"2025-03-12T06:19:15.000Z","dependencies_parsed_at":"2023-02-01T06:16:00.985Z","dependency_job_id":null,"html_url":"https://github.com/brutalsavage/facebook-post-scraper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutalsavage%2Ffacebook-post-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutalsavage%2Ffacebook-post-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutalsavage%2Ffacebook-post-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutalsavage%2Ffacebook-post-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brutalsavage","download_url":"https://codeload.github.com/brutalsavage/facebook-post-scraper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393570,"owners_count":20931813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beautifulsoup4","facebook-scraper","facebook-scraper-software","facebook-scraper-tool","python","selenium-webdriver"],"created_at":"2024-08-01T16:02:38.832Z","updated_at":"2025-04-05T20:08:18.147Z","avatar_url":"https://github.com/brutalsavage.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Facebook Scraper Selenium\n\nScrape Facebook Public Posts without using Facebook API \n\n## What It can Do\n\n- Scrape Public Post Text\n    - Raw Text\n    - Picture\n    - Link\n- Scrape Likes and Top 3 React Numbers\n- Scrape Public Post Comments \n    - Links in Comments\n    - Pictures in Comments\n\n## Install Requirements\n\nPlease make sure chrome is installed and ```chromedriver``` is placed in the same directory as the file\n\nFind out which version of ```chromedriver``` you need to download in this link [Chrome Web Driver](http://chromedriver.chromium.org/downloads).\n\nPlace your Facebook login in info into ```facebook_credentials.txt```\n\nOptional:\nTo download all videos from a specific page, make sure that [youtube-dl](https://github.com/ytdl-org/youtube-dl/) binary is downloaded locally.\n\n\n```sh\npip install -r requirements.txt\n```\n\n## Usage\n\n#### 1. Use scraper.py to print to screen or to file\n\n```\nusage: scraper.py [-h] -page PAGE -len LEN [-infinite INFINITE] [-usage USAGE]\n                  [-comments COMMENTS]\n\nFacebook Page Scraper\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nrequired arguments:\n  -page PAGE, -p PAGE   The Facebook Public Page you want to scrape\n  -len LEN, -l LEN      Number of Posts you want to scrape\n\noptional arguments:\n  -infinite INFINITE, -i INFINITE\n                        Scroll until the end of the page (1 = infinite)\n                        (Default is 0)\n  -usage USAGE, -u USAGE\n                        What to do with the data: Print on Screen (PS), Write\n                        to Text File (WT) (Default is WT)\n  -comments COMMENTS, -c COMMENTS\n                        Scrape ALL Comments of Posts (y/n) (Default is n).\n                        When enabled for pages where there are a lot of\n                        comments it can take a while\n\n```\n\n#### 2. Use ```extract()``` to grab list of posts for additional parsing\n\n```\nfrom scraper import extract\n\nlist = extract(page, len, etc..)\n\n# do what you want with the list \n```\n\nReturn value of ```extract()``` :\n\n```python\n[\n{'Post': 'Text text text text text....',\n 'Link' : 'https://link.com',\n 'Image' : 'https://image.com',\n 'Comments': {\n        'name1' : {\n            'text' : 'Text text...',\n            'link' : 'https://link.com',\n            'image': 'https://image.com'\n         }\n        'name2' : {\n            ...\n            }\n         ...\n         },\n 'Reaction' : { # Reaction only contains the top3 reactions\n        'LIKE' : int(number_of_likes),\n        'HAHA' : int(number_of_haha),\n        'WOW'  : int(number_of_wow)\n         }}\n  ...\n]\n```\n\n#### 3. Use ```download_entire_page_videos``` to download all videos from a specific Facebook page\nExample:\n```\ndownload_entire_page_videos.py --chromedriver chromedriver.exe --youtube_dl youtube-dl.exe --fbpage https://www.facebook.com/groups/[GROUP_ID]/ --numofposts 100\n```\n\n### Note:\n\n- Please use this code for Educational purposes only\n- Will continue to add additional features and data\n    - ~comment chains scraping~\n    - comment reaction scraping\n    - different comment display (Most Relevant, New, etc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrutalsavage%2Ffacebook-post-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrutalsavage%2Ffacebook-post-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrutalsavage%2Ffacebook-post-scraper/lists"}