null values response get_profile()
msfs1992 opened this issue · 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"}
same problem
same problem
I experienced the same problem. Did anybody manage to solve this?
@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
(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
hope this help you
same problem