Skip to main content

Scraping facebook page tool

Project description

facebook_scraper_vn version 0.0.1

facebook_scraper_vn is a python package for scraping facebook's page. It can get text content, date, image, video, post engagement's post.

[!WARNING] This package is only developed for learning purposes

Installation

pip install facebook_scraper_vn

Sample

Firstly, we need to create and save a facebook's cookie into a file called "facebook_cookies.json" in the current folder

from facebook_scraper_vn.facebook_scraper import FacebookScraper

scraper = FacebookScraper("your facebook's email", "your facebook's password")
scraper.generate_cookie()

And when we had the cookie, we started to scrape

from facebook_scraper_vn.facebook_scraper import FacebookScraper

SCROLL_NUMBER = 5

scraper = FacebookScraper("your facebook's email", "your facebook's password") 
# scraper.generate_cookie() # run this line if we dont have cookie
scraper.load_cookie()
facebook_pages = ["hustconfession"] # page's id list
scraper.fetch_page(facebook_pages, SCROLL_NUMBER)

[!TIP] The higher "SCROLL_NUMBER" value, the more pages are scraped

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

facebook_scraper_vn-0.0.1.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

facebook_scraper_vn-0.0.1-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page