POST http://www.zimuzu.tv/User/Login/ajaxLogin HTTP/1.1 Host: www.zimuzu.tv Connection: keep-alive Content-Length: 102 Accept: application/json, text/javascript, */*; q=0.01 Origin: http://www.zimuzu.tv X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36 Content-Type: application/x-www-form-urlencoded DNT: 1 Referer: http://www.zimuzu.tv/user/login Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.8,en;q=0.6 Cookie: PHPSESSID=st40f3vohv6q16ec3atekimba0; last_item:10733=Game.of.Thrones.S06E01.The.Red.Woman.1080p.WEB-DL.DD5.1.H.264-NTb.mkv; last_item_date:10733=1461856566; mykeywords=a%3A2%3A%7Bi%3A0%3Bs%3A6%3A%22%E7%A1%85%E8%B0%B7%22%3Bi%3A1%3Bs%3A14%3A%22Silicon+Valley%22%3B%7D; zmz_rich=2 account=你的用户名&password=你的密码&remember=1&url_back=http%3A%2F%2Fwww.zimuzu.tv%2Fuser%2Fsign
"""
python3使用requests登录人人影视网站.py
2016年5月11日 07:33:59 codegay
参考资料requests文档:
http://cn.python-requests.org/zh_CN/latest/
四种常见的 POST 提交数据方式
https://imququ.com/post/four-ways-to-post-data-in-http.html
"""
import re
import requests
#requests 安装命令:pip install requests
loginurl='http://www.zimuzu.tv/User/Login/ajaxLogin'
surl='http://www.zimuzu.tv/user/sign'
httphead={
'Accept':'application/json, text/javascript, */*; q=0.01',
'Origin':'http://www.zimuzu.tv',
'X-Requested-With':'XMLHttpRequest',
'User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded',
}
data="account=用户名&password=密码&remember=1"
session=requests.Session()
login=session.post(loginurl,data=data,headers=httphead)
print(login.cookies)#打印登录后取得到cookies对象
print(login.json())
getstat=session.get(surl).text.split("\n") #访问签到页面,显示最近三次登录时间
[print(r) for r in getstat if "三次登录时间" in r]
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有