如何使用python(requests / urllib3)登录Facebook? [英] How can I log in to facebook using python (requests/urllib3)?

查看:1284
本文介绍了如何使用python(requests / urllib3)登录Facebook?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用 http://docs.python-requests.org/en/latest / 自动登录Facebook。

Im trying to use http://docs.python-requests.org/en/latest/ to log into facebook automatically.

s = requests.session()
params = {'email':'MYEMAILHERE','pass':'MYPASSHERE'}
r = s.post("https://www.facebook.com/login.php/", params = params)

print r.text

但是代替fb显示我的首页,

But instead of fb showing me the home page it shows the me the "your cookies are disabled"... page.

推荐答案

Michael Heimlich使用python-请求:

Michael Heimlich made a project for integrating with the Facebook API using python-requests:

https://github.com/ michaelhelmick / requests-facebook

仍在等待正确的REST集成。

Still waiting for the proper REST integration though.

也FacePy: https://github.com/jgorset/facepy

这篇关于如何使用python(requests / urllib3)登录Facebook?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆