kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.29k stars 616 forks source link

image_lowquality vs image from previous version #272

Closed Eevaariste closed 3 years ago

Eevaariste commented 3 years ago

Hello! so i face this issue with the new version: In a previous version where image was something like the image_lowquality i was getting better quality images than the ones that image_lowquality now does. When i inspect element and i get the scontent link i get a link with the image that previous version gave. Is there a way that i can use the previous image with the new updates?

neon-ninja commented 3 years ago

What post are you having this problem with? Can you provide the code you used?

Eevaariste commented 3 years ago

so the code is simple it is something like that: from facebook_scraper import get_posts

for post in get_posts(group='something', pages=4, options={"allow_extra_requests": False, "comments": False, "reactors": False, "posts_per_page": 20},cookies='cookies.json'): print(post['image_lowquality'])

but then i get a lower quality image than the previous version that i think returned the one that you can see when you inspect element

inspect element one : https://scontent.fher1-1.fna.fbcdn.net/v/t1.6435-9/133877768_386810179283921_5786680494833499598_n.jpg?_nc_cat=111&ccb=1-3&_nc_sid=825194&_nc_ohc=uds4M7TzhUkAX-CbXYQ&_nc_ht=scontent.fher1-1.fna&oh=67049023054a5a9f6296ab8be4c50446&oe=60CA98EB

image_lowquality: https://scontent.fher1-1.fna.fbcdn.net/v/t1.6435-0/cp0/e15/q65/s320x320/133877768_386810179283921_5786680494833499598_n.jpg?_nc_cat=111&ccb=1-3&_nc_sid=ca434c&efg=eyJpIjoidCJ9&_nc_ohc=uds4M7TzhUkAX-CbXYQ&_nc_ht=scontent.fher1-1.fna&tp=9&oh=82adc18ff4d5b6182a03fb548c285ae8&oe=60CABB7E

neon-ninja commented 3 years ago

Getting a high resolution image requires an extra request, so "allow_extra_requests": False, is the problem here

Eevaariste commented 3 years ago

omg i am dum dum ! Thank you Sir Bless you!