kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.47k stars 635 forks source link

get_posts returns nothing #1102

Open beatrisu21 opened 7 months ago

beatrisu21 commented 7 months ago

Func get_posts returns nothing

Here is my code (same as one on the main page of this repo):

from facebook_scraper import get_posts for post in get_posts('nintendo', cookies="/Users/beatrisu/Desktop/twi/1.txt"): print(post['text'][:50])

output: (gg) beatrisu@Savelijs-MacBook-Air twi % /Users/beatrisu/Desktop/twi/gg/bin/pyth on /Users/beatrisu/Desktop/twi/scrap.py /Users/beatrisu/Desktop/twi/gg/lib/python3.9/site-packages/facebook_scraper/facebook_scraper.py:912: UserWarning: Facebook says 'Unsupported Browser' warnings.warn(f"Facebook says 'Unsupported Browser'")

get_group_info and get_profile are working ok but with some warnings.

jaimeelincoln commented 7 months ago

Having the same issue suddenly today. Can't get something simple like the example code you're using to work either

beatrisu21 commented 7 months ago

Also I got my facebook account blocked. It asks my id now

minhson1411 commented 7 months ago

I had the same issue, I think this tool is no longer usable

aoiotoko commented 6 months ago

I had the same issue, I think this tool is no longer usable

I agree.

Defcon27 commented 6 months ago

I too faced the same issue

DarkzAtom commented 6 months ago

So, I guess, sadly, this tool isn't usable for now?

YSHebron commented 6 months ago

I'm also experiencing the same.

frishtik commented 6 months ago

oh shoot. figured out the entire configuration finally, just to bump into the same problem -- results ARE being returned, but the fields are just none (all but the username). Anyone got any way forward? I need specifically get_profile.

ChillVibesMushroom commented 6 months ago

I used this code it was written via ai maybe facebook scraper selenium will help but what happened to dude yup

from facebook_scraper import get_posts

Initialize a list to store the first two posts

first_two_posts = []

Iterate over the posts and append the first two to the list

for post in get_posts('BigQuax', cookies="exported-cookies.json",pages=2): first_two_posts.append(post)

Print the first two posts

for post in first_two_posts: print(post)

MadsMMP commented 5 months ago

Having the same issue suddenly.

AbdElrahmanMostafaRifaat1432 commented 5 months ago

has anyone reached any solution or found a good library to scrabe facebook other than this library I really need any solution for my project

moda20 commented 5 months ago

@AbdElrahmanMostafaRifaat1432 yeah, i forked this repo and it's working correctly here : https://github.com/moda20/facebook-scraper

i also forked a second repo that scrapes fb without logins, this one does less but is good enough : https://github.com/moda20/facebook_page_scraper

Note: these repos are for personal use and will certainally lead to rate limiting and banning your account even is you use them too much

MadsMMP commented 5 months ago

@AbdElrahmanMostafaRifaat1432 yeah, i forked this repo and it's working correctly here : https://github.com/moda20/facebook-scraper

i also forked a second repo that scrapes fb without tokens, this one does less but good enough : https://github.com/moda20/facebook_page_scraper

Note: these repos are for personal use and will certainally lead to rate limiting and banning your account even is you use them too much

Thanks, i will need to pull like once or twice a week will this be possible with this repo?

moda20 commented 5 months ago

@MadsMMP yes, it should suffice for that but don't pull more than a hundred at a time, you will get blocked by fb for sure

AbdElrahmanMostafaRifaat1432 commented 5 months ago

@moda20 can you explain how to control that using parameters please or which parameters to use to make sure I don't exceed 100

because I see alot of parameters that I cannot understand like pages and posts per pages