facebook-scraper icon indicating copy to clipboard operation
facebook-scraper copied to clipboard

get_posts returns nothing

Open beatrisu21 opened this issue 1 year ago • 15 comments

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.

beatrisu21 avatar May 02 '24 00:05 beatrisu21

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

jaimeelincoln avatar May 02 '24 04:05 jaimeelincoln

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

beatrisu21 avatar May 02 '24 06:05 beatrisu21

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

minhson1411 avatar May 06 '24 06:05 minhson1411

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

I agree.

aoiotoko avatar May 09 '24 21:05 aoiotoko

I too faced the same issue

Defcon27 avatar May 16 '24 20:05 Defcon27

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

DarkzAtom avatar May 16 '24 22:05 DarkzAtom

I'm also experiencing the same.

YSHebron avatar May 29 '24 05:05 YSHebron

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.

frishtik avatar May 29 '24 08:05 frishtik

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)

ChillVibesMushroom avatar May 31 '24 17:05 ChillVibesMushroom

Having the same issue suddenly.

MadsMMP avatar Jun 11 '24 10:06 MadsMMP

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

@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

moda20 avatar Jun 12 '24 10:06 moda20

@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?

MadsMMP avatar Jun 12 '24 10:06 MadsMMP

@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

moda20 avatar Jun 12 '24 20:06 moda20

@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