Skip to content

Commit

Permalink
Updated package due to similarity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ishan-surana committed Jun 28, 2024
1 parent 892d37b commit 32ca6b7
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 126 deletions.
76 changes: 0 additions & 76 deletions FacebookScraper.egg-info/PKG-INFO

This file was deleted.

10 changes: 0 additions & 10 deletions FacebookScraper.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion FacebookScraper.egg-info/dependency_links.txt

This file was deleted.

2 changes: 0 additions & 2 deletions FacebookScraper.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion FacebookScraper.egg-info/top_level.txt

This file was deleted.

Binary file not shown.
Binary file removed FacebookScraper/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ class FacebookScraper:
scraper = FacebookScraper("page_id")
result = scraper.scrape()
data = scraper.scrape()
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']}")
print(f"Followers: {data['followers']}")
print(f"Post Texts: {data['post_texts']}")
print(f"Post Likes: {data['post_likes']}")
print(f"Post Shares: {data['post_shares']}")
print(f"Is Video: {data['is_video']}")
print(f"Video Links: {data['video_links']}")
"""

def __init__(self, page_id: str):
Expand Down Expand Up @@ -278,14 +278,14 @@ def scrape(self) -> dict:
To scrape a Facebook page:
scraper = FacebookScraper("page_id")
result = scraper.scrape()
data = scraper.scrape()
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']}")
print(f"Followers: {data['followers']}")
print(f"Post Texts: {data['post_texts']}")
print(f"Post Likes: {data['post_likes']}")
print(f"Post Shares: {data['post_shares']}")
print(f"Is Video: {data['is_video']}")
print(f"Video Links: {data['video_links']}")
"""
try:
self.__setup_driver()
Expand All @@ -295,7 +295,7 @@ def scrape(self) -> dict:
self.__scroll_to_top()
self.__get_xpath_constructor()
self.__extract_post_details()

print("\033[A\033[A\033[A") # DevTools line deleter
return {
'followers': self.followers,
'post_texts': self.post_texts,
Expand Down
22 changes: 11 additions & 11 deletions FacebookScraper/__init__.py → MetaDataScraper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
FacebookScraper Module
MetaDataScraper Module
----------------------
This module provides a script `FacebookScraper` to scrape information from a public Facebook page.
This module provides a script `MetaDataScraper` to scrape information from a public Facebook page.
Overview:
---------
The `FacebookScraper` module is designed to automate the extraction of follower counts and post details
The `MetaDataScraper` module is designed to automate the extraction of follower counts and post details
from a public Facebook page. It uses Selenium WebDriver for web automation and scraping.
Classes:
Expand All @@ -26,20 +26,20 @@
Usage:
------
from FacebookScraper import FacebookScraper
from MetaDataScraper import FacebookScraper
page_id = "your_facebook_page_id"
scraper = FacebookScraper(page_id)
result = scraper.scrape()
data = scraper.scrape()
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']}")
print(f"Followers: {data['followers']}")
print(f"Post Texts: {data['post_texts']}")
print(f"Post Likes: {data['post_likes']}")
print(f"Post Shares: {data['post_shares']}")
print(f"Is Video: {data['is_video']}")
print(f"Video Links: {data['video_links']}")
"""

from .FacebookScraper import FacebookScraper
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# FacebookScraper
# MetaDataScraper

FacebookScraper is a Python package designed to automate the extraction of information like follower counts, and post details & interactions from a public Facebook page. It uses Selenium WebDriver for web automation and scraping.
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 FacebookScraper using pip:
You can install MetaDataScraper using pip:

```
pip install FacebookScraper
pip install MetaDataScraper
```

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

## Usage

To use FacebookScraper, follow these steps:
To use MetaDataScraper, follow these steps:

1. Import the FacebookScraper class:

```python
from FacebookScraper import FacebookScraper
from MetaDataScraper import FacebookScraper
```

2. Initialize the scraper with the Facebook page ID:
Expand Down
Binary file removed dist/FacebookScraper-0.0.1-py3-none-any.whl
Binary file not shown.
Binary file removed dist/facebookscraper-0.0.1.tar.gz
Binary file not shown.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "FacebookScraper"
name = "MetaDataScraper"
version = "0.0.1"
authors = [
{ name="Ishan Surana", email="ishansurana1234@gmail.com" },
Expand All @@ -12,8 +12,8 @@ description = "A module designed to automate the extraction of follower counts a
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache License 2.0",
"Operating System :: Windows",
"License :: OSI Approved :: Apache Software License",
"Operating System :: Microsoft :: Windows",
]
dependencies = [
'selenium == 4.1.0',
Expand All @@ -22,4 +22,4 @@ dependencies = [
requires-python = ">=3.10"

[project.urls]
Homepage = "https://github.com/ishan-surana/FacebookScraper"
Homepage = "https://github.com/ishan-surana/MetaDataScraper"

0 comments on commit 32ca6b7

Please sign in to comment.