Skip to main content

A module designed to automate the extraction of follower counts and post details from a public Facebook page.

Project description

MetaDataScraper

MetaDataScraper is a Python package designed to automate the extraction of information like follower counts, and post details & interactions from a public Facebook page, in the form of a FacebookScraper object. It uses Selenium WebDriver for web automation and scraping.

Installation

You can install MetaDataScraper using pip:

pip install MetaDataScraper

Make sure you have Python 3.x and pip installed.

Usage

To use MetaDataScraper, follow these steps:

  1. Import the FacebookScraper class:

    from MetaDataScraper import FacebookScraper
    
  2. Initialize the scraper with the Facebook page ID:

    scraper = FacebookScraper("page_id")
    
  3. Scrape the Facebook page to retrieve information:

    result = scraper.scrape()
    
  4. Access the scraped data from the result dictionary:

    print(f"Followers: {result['followers']}")
    print(f"Post Texts: {result['post_texts']}")
    print(f"Post Likes: {result['post_likes']}")
    print(f"Post Shares: {result['post_shares']}")
    print(f"Is Video: {result['is_video']}")
    print(f"Video Links: {result['video_links']}")
    

Features

  • Scraping: Extracts followers count and post details (text, likes, shares, video links) from Facebook pages.
  • Flexibility: Handles various post structures and video formats on Facebook pages.
  • Headless Mode: Runs in headless mode for silent scraping without UI interference.

Dependencies

  • selenium
  • webdriver_manager

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

metadatascraper-0.0.3.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

MetaDataScraper-0.0.3-py3-none-any.whl (10.3 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