抓包
抓包工具
登录完整请求
POST /web/login.php HTTP/1.1 Host: www.yb3.cc User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0 Accept: application/json, text/javascript, */* Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate, br Content-Type: application/x-www-form-urlencoded X-Requested-With: XMLHttpRequest Content-Length: 44 Origin: https://www.yb3.cc Connection: keep-alive Referer: https://www.yb3.cc/ Cookie: UM_distinctid=17118e0194d10c-05116541e32f538-4c302f7e-e1000-17118e0194e1cf; CNZZDATA1262370718=351798230-1585257263-%7C1585257263 username=1232&password=123456&usecookie=3600
编码
import requests host = 'https://www.yb3.cc' login_path = '/web/login.php' login_url = host + login_path headers = { "User-Agent": "mozilla/4.0 (compatible; MSIE 5.5; Windows NT)", } data = dict( username='gini', password='123456', usecookie=3600 ) resp = requests.post(login_url, headers=headers, data=data) print(resp.status_code) print(resp.text) /*输出 200 {"msg":"登录成功","return_uri":"/","stat":1} */
谢谢
今天的文章网页爬虫之路 xx小说分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/55517.html