Skip to content

Commit

Permalink
tweak link extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-ninja committed Jul 21, 2022
1 parent a97eed0 commit b69eb53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion facebook_scraper/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def extract_links(self) -> PartialPost:
link = self.link_regex.search(self.element.html)
if link:
link = utils.unquote(link.groups()[0])
links = self.element.find(".story_body_container div p a")
links = self.element.find(".story_body_container>div a:not([href='#'])")
links = [{"link": a.attrs["href"], "text": a.text} for a in links]
return {"link": link, "links": links}

Expand Down

0 comments on commit b69eb53

Please sign in to comment.