Skip to content

Commit

Permalink
Alternative way of getting page ID in get_page_info
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-ninja committed Jul 28, 2022
1 parent e833d39 commit e1288ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions facebook_scraper/facebook_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ def get_page_info(self, page, **kwargs) -> Profile:
url = f'/{page}/'
logger.debug(f"Requesting page from: {url}")
resp = self.get(url)
result["id"] = re.search(r'pageID:"(\d+)"', resp.html.html).group(1)
result["name"] = resp.html.find("title", first=True).text.replace(" - Home", "")
desc = resp.html.find("meta[name='description']", first=True)
ld_json = None
Expand Down

0 comments on commit e1288ce

Please sign in to comment.