facebook-scraper
facebook-scraper copied to clipboard
facebook_scraper.py:910: UserWarning: Facebook says 'Unsupported Browser' warnings.warn(f"Facebook says 'Unsupported Browser'")
import set_user_agent along with get_posts and then before you call get_posts, call set_user_agent with a more modern user agent string from your browser
@Enuratique thnx for the answer... so, the default configuration is: default_headers = { 'Accept-Language': 'en-US,en;q=0.5', "Sec-Fetch-User": "?1", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8", }
the latest update in my chrome is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
can you help me please?
set_user_agent("Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36")
should work
It looks like the warning has something to do with video posts with url redirects (from what I could surmise of facebook-scraper.py line 912)
From another solution for a different issue, I used the following line and it at least ignores the warning until a better solution is found.
import warnings
warnings.filterwarnings('ignore', message="Facebook says 'Unsupported Browser'")