facebook-scraper
facebook-scraper copied to clipboard
Unsupported browser issue...
`from facebook_scraper import get_posts
def scrape_posts(user_id): post_urls = [] for post in get_posts(user_id): if 'post_url' in post: post_urls.append(post['post_url']) return post_urls
target_user = input("Enter target user ID: ") post_urls = scrape_posts(target_user)
print("Post URLs:")
for url in post_urls:
print(url)
This is the error:
UserWarning: Facebook says 'Unsupported Browser'
warnings.warn(f"Facebook says 'Unsupported Browser'")`
Warnings are not the same as errors. Your code should run fine, just wait for a couple of seconds and the scraper will run automatically.