Skip to content

Commit

Permalink
Made some minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
ishan-surana committed Jun 28, 2024
1 parent 32ca6b7 commit b524762
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions MetaDataScraper/FacebookScraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
import time
import logging
logging.getLogger().setLevel(logging.CRITICAL)

class FacebookScraper:
"""
A class to scrape information from a public Facebook page.
A class to scrape information from a public Facebook page. It does not require any authentication or API keys.
Attributes
----------
page_id : str
Expand Down Expand Up @@ -55,7 +55,7 @@ class FacebookScraper:
Example
-------
To scrape a Facebook page:
from FacebookScraper import FacebookScraper
from MetaDataScraper import FacebookScraper
scraper = FacebookScraper("page_id")
Expand Down Expand Up @@ -113,7 +113,6 @@ def __check_page_accessibility(self):
Checks if the page is accessible.
If not, it quits the driver and raises an exception.
"""
from selenium.webdriver.common.keys import Keys
self.driver.find_element(By.TAG_NAME, "html").send_keys(Keys.TAB)
self.driver.find_element(By.TAG_NAME, "html").send_keys(Keys.SHIFT + Keys.TAB)
self.driver.switch_to.active_element.click()
Expand Down
2 changes: 1 addition & 1 deletion MetaDataScraper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Classes:
--------
FacebookScraper
A class to scrape followers count and post details from a public Facebook page.
A class to scrape followers count and post details from a public Facebook page. It does not require any authentication or API keys.
Methods:
------------------------
Expand Down

0 comments on commit b524762

Please sign in to comment.