Skip to content

Commit

Permalink
adjust selector for rare case where articles are replaced by divs
Browse files Browse the repository at this point in the history
as per issue kevinzg#172
  • Loading branch information
neon-ninja committed Mar 14, 2021
1 parent 43246af commit ae76348
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion facebook_scraper/page_iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, response: Response):

def get_page(self) -> Page:
raw_page = self.get_raw_page()
raw_posts = raw_page.find('article[data-ft]') # Select only articles that have the data-ft attribute
raw_posts = raw_page.find('article[data-ft],div.async_like[data-ft]') # Select only articles that have the data-ft attribute

if not raw_posts:
logger.warning("No raw posts (<article> elements) were found in this page.")
Expand Down

0 comments on commit ae76348

Please sign in to comment.