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

null values response get_profile()

Open msfs1992 opened this issue 2 years ago • 7 comments

i get null values for any profile

code snippet: from facebook_scraper import *

set_user_agent( "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")

r = get_profile("zuck", cookies="fc.txt") with open('fb.txt', 'w') as json_file: json.dump(r, json_file)

response: {"Friend_count": null, "Follower_count": null, "Following_count": null, "Name": "Mark Zuckemberg"}

msfs1992 avatar Aug 07 '23 00:08 msfs1992

same problem

AritzUMA avatar Aug 11 '23 17:08 AritzUMA

@kevinzg Any solution or accurate answer? we would appreciate it so much bro

msfs1992 avatar Aug 11 '23 18:08 msfs1992

same problem

MarcosChavarria avatar Oct 04 '23 18:10 MarcosChavarria

I experienced the same problem. Did anybody manage to solve this?

dmaizel avatar Oct 28 '23 10:10 dmaizel

@AritzUMA @MarcosChavarria @msfs1992 @dmaizel HERE IS THE REASON I'm working on the same task and i find that this function is already useless. That's because this function is using request_html in which function response.html.find("css selector" ) work to extract data from homepage by css,as belows image image (the css selector dosen't work) But whenever facebook changes its page struture,we couldn't extract the data we want in the origional way.

If you want to use the function, you need to wait until it beem rewritten, or rewrite it by yourself. It's not a very hard task, you just need review the homepage and replace it with the new css selector

justAbendan avatar Oct 31 '23 17:10 justAbendan

hope this help you

justAbendan avatar Oct 31 '23 17:10 justAbendan

same problem

eternaluser18 avatar Nov 06 '23 16:11 eternaluser18