kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.4k stars 628 forks source link

numbers in page title being counted as likes #415

Open jlp-io opened 3 years ago

jlp-io commented 3 years ago

result["likes"] in get_page_info will return the first int it can find when scraping the page. if a page title has a number it will be erroneously added as the page like count

I will be looking into this myself once I'm unblocked

neon-ninja commented 3 years ago

I originally had ([\d,]+)\s+likes as the regex there, but changed it due to a comment on https://github.com/kevinzg/facebook-scraper/commit/336621df75e86f682af353167c39b72a55fd2b34. https://github.com/kevinzg/facebook-scraper/commit/93d33b785a9b1dd454915d470a11f11a05df6d46 should fix this edge case.