Hi there 👋, I'm xchaoinfo. Web Developer & Data Analyst
xchaoinfo / fuck-login Goto Github PK
View Code? Open in Web Editor NEW模拟登录一些知名的网站,为了方便爬取需要登录的网站
模拟登录一些知名的网站,为了方便爬取需要登录的网站
Cookie 未能加载
Traceback (most recent call last):
File "zhihu.py", line 135, in
if isLogin():
File "zhihu.py", line 82, in isLogin
login_code = session.get(url, headers=headers, allow_redirects=False).status_code
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 467, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send
raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
把 82行 login_code = session.get(url, headers=headers, allow_redirects=False).status_code
改为
login_code = session.get(url, headers=headers, allow_redirects=False,verify=False).status_code
500
<TITLE>Internal Server Error</TITLE>The server encountered an internal error or misconfiguration and was unable to
complete your request.
Reference #3.1d680317.1472696327.8b453f7
现在好像只有通过邮箱登录的方式,可以增加手机号登录
web微信登录中appid=wx782c26e4c19acffb,这个appid是怎么来的?
通过Chrome开发者工具分析浏览器访问126邮箱的请求,发现其中有两个POST请求:
1)http://passport.126.com/dl/l
2)https://mail.126.com/entry/cgi/ntesdoor?
请问,你是怎么发现可以绕过第一个POST请求的?
如果完全按照浏览器登录126的过程,将会涉及到调用页面js对密码进行加密,发往126进行验证。之后的登录就是基于126返回的cookie了,第二个POST的表单内容都不用包括password了。感觉模拟整个过程,还是比较繁琐的。。不知道是不是我想复杂了,求指教,谢谢!
形如以下字符串所拼接成的一个完整的cookie
ALF=1508402613;
Apache=8011726459953.934.1476866663139;
SCF=【实际需要,但phantomJS没获取到】
SINAGLOBAL=8011726459953.934.1476866663139;
SSOLoginState=1476866657;
SUB=【实际需要,但phantomJS没获取到】
SUHB=079ir7sjI-ybjm;
SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9WWRA0_nRLiEO4qNVpFZ7AQh5JpX5K2hUgL.FozXe0M41KMN1KM2dJLoI7fzqgL0dgLj9HvNqg4r;
ULV=1476866663145:1:1:1:8011726459953.934.1476866663139:
UOR=【可有可无,但phantomJS也没获取到】
YF-Page-G0=【可有可无,但phantomJS没获取到】
YF-Ugrow-G0=b02489d329584fca03ad6347fc915997;
YF-V5-G0=a0e87040bfaca9b1b05c465a9e888d2d;
_s_tentry=-;
wvr=6;
os.startfile('checkcode.gif')
仅在Windows下可用,Linux下应该是类似于:
import subprocess, sys
opener ="open" if sys.platform == "darwin" else "xdg-open"
subprocess.call([opener, 'checkcode.gif'])
用代码内的验证方法,没有得到个人信息,貌似登录不小了,大神检查下啊
知乎isLogin()函数,报错
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
添加verify=False
后不报错了,有一些警告信息。
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
您好!
最近有时间吗?可以指点一下 苏宁易购登陆加密处理思路吗?
uuid_res = re.findall(uuid_pa, uuid, re.S)[0]
uuid_res = re.findall(uuid_pa, uuid, re.S)[0]
IndexError: list index out of range
完全copy您的代码,得到的结果是"验证码会话无效 :(”,接下来,在登陆之后尝试获取只有正常登陆才能获取的页面,但是依然获取的是登陆页面的代码。
url = 'https://www.zhihu.com/people/shi-wei-56-10/followees'
page = session.get(url, headers=headers)
print page.text
RT,不知道啥原因。。,即使输入错误的密码 也是提示这个
返回状态码200 和 “验证码会话无效”,什么情况呢
({"username":"\u8bf7\u5237\u65b0\u9875\u9762\u540e\u91cd\u65b0\u63d0\u4ea4","_t":"_ntoxNxL"})
是否有模拟登录智联招聘的相关代码
豆瓣模拟登录很简单,只有一个验证码需要识别一下。有人写嘛?没人的话我可以写
如题
请帮忙实现一下登录简书查看我的收藏
直接导入使用时候控制台显示Cookie 未能加载,但是能正常使用,请问这是什么原因呢
知乎的那个可以登录,但是登陆了以后,如何带cookie访问一个url啊...
直接在后面接urllib.request.urlopen(url).read(),这样好像并不能带cookie,不知道应该怎么写呢?
抱歉刚上手,百度的结果试了一下都有些问题,要不就是python2的...求解~~
您好,我是一名学生,编程经验很少,所以有些问题想向您请教下?
1:在您的程序中,手机扫完码以及确认后,会有http://login.sina.com.cn/sso/qrcode/check?entry=weibo&qrid=...&callback=...的http请求,在获得alt的内容后,也会有http://login.sina.com.cm/sso/login.php?......的请求,可是我用chrome扫码登录了好多次,在chrome自带的network中也没有找到上面的请求,想问下您是怎么找到的?
2:我在执行程序时,遇到了这样的错误:[WinError 10061] 由于目标计算机积极拒绝,无法连接。',
请问这样该如何解决?
恳请您能回答这些问题!
先是pre_login接口返回需要验证码,输入验证码继续后login接口https://passport.weibo.cn/sso/login 仍然返回“请输入验证码”:
{u'msg': u'\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801', u'data': {u'errline': 433}, u'retcode': 50011005}
已经检查了请求前的postdata,pincode和pcid字段都有值:
{'username': '[email protected]', 'code': '', 'pincode': 'XYAnX', 'ec': '0', 'client_id': '', 'pagerefer': '', 'password': 'xxxxx', 'qq': '', 'savestate': '1', 'wentry': '', 'hfp': '', 'pcid': u'gz-7982c82f4b4d581b29a52ae56c83cddaae1b', 'loginfrom': '', 'entry': 'mweibo', 'hff': ''}
login函数后我直接加入了:
return weibo_page.content.decode("utf-8",'ignore')
返回了我微博的主界面,但是返回界面标签包裹中的符号的转义字符还存在,如,当我找关注数时(.*)</strong>第二个标签会出现这样的转义符。
我的运行环境是anaconda环境自带的的Spyder3,ipython输出界面上的输出。
请问是编译器问题,还是我提取网页的方式有问题。
之前做过知乎登录,无奈验证码的那个调用的字符不知道怎么获取。
就是 http://www.zhihu.com/captcha.gif?r=1471341285051&type=login 中 r=xxxxxxxxxx
中的数字,看了你的源码才明白跟时间有关的。
亲问楼主,这个数字的来源是通过自己的经验和判断得出来的吗 ? 还是在源码或者抓包中找到的?
谢谢!
可以po一下appannie的教程嗎
楼主试试这个?(´・_・`)
http://weixin.sogou.com 验证码弹得太厉害了,能否支持一下?
谢谢你提供这么详尽完备的代码。但是我碰到了如题的问题,请问是啥原因?谢谢!
请输入你的用户名
[email protected]
请输入你的密码
邮箱登录
200
<title>知乎 - 与世界分享你的知识、经验和见解</title> <script src="https://static.zhihu.com/static/revved/-/js/instant.14757a4a.js"></script>如题,多谢分享
you help me tks
lagou的登录过程应该变了,楼主啥时能更新下,谢谢!
[
, , , , , , , , , ,
]
这里的 data[rstr] = input_list[8]['value'] (大概60行左右)由于alue的值缺失。 (input list就是上面的list)
再写个Quora.com网站的登录吧??
研究了半天猎头登录的流程,没有发现任何下手的地方。
注意是登录猎头账号,不是求职者账号。
谢谢。
http://ah.189.cn/sso/login?returnUrl=%2Fservice%2Faccount%2Finit.action
1.验证码简单易识别
2.post登陆Cookies不易获取
3.请教一下大牛
大家觉得把哪个网站作为例子,比较好,欢迎提各种意见。
或者发 Email 到 [email protected] 讨论这个问题。
xchaoinfo
2016.10.14
楼主,可以试试51Job登录吗?谢谢!
我之前用过www.zhihu.com/login/phone_num和login/email,都不能够登入,您的项目用的是/setting/profile,请问您是如何确定这个网址的
报错信息:
File "E:/pyWorkSpace/baidu_key/weibo.py", line 128, in login
crossdomain = js["data"]["crossdomainlist"]
KeyError: 'crossdomainlist'
我调试查看了js中的内容,发现现在的js中是“loginresulturl”没有“crossdomainlist”,但是更改为“loginresulturl”仍然报错
请问这个该怎么处理?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.