Skip to content

Commit

Permalink
different way of extracting page ID in get_page_info
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-ninja committed Aug 31, 2022
1 parent 2552c6f commit c0e38bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion facebook_scraper/facebook_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,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["id"] = re.search(r'pages/transparency/(\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 c0e38bf

Please sign in to comment.