1 Star 1 Fork 1

kelejuan77/52破解自动签到

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
autosing.py 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
kelejuan77 提交于 2023-02-04 05:03 . update autosing.py.
import requests
from bs4 import BeautifulSoup
cookie = ""
url1 = 'https://www.52pojie.cn/CSPDREL2hvbWUucGhwP21vZD10YXNrJmRvPWFwcGx5JmlkPTImcmVmZXJlcj0lMkY=?wzwscspd=MC4wLjAuMA=='
url2 = 'https://www.52pojie.cn/home.php?mod=task&do=apply&id=2&referer=%2F'
url3 = 'https://www.52pojie.cn/home.php?mod=task&do=draw&id=2'
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-CN,zh;q=0.9",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Cookie": cookie,
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
}
r = requests.get(url1, headers=headers, allow_redirects=False)
s_cookie = r.headers['Set-Cookie']
print(s_cookie)
cookie = cookie + s_cookie
headers['Cookie'] = cookie
r = requests.get(url2, headers=headers, allow_redirects=False)
s_cookie = r.headers['Set-Cookie']
print(s_cookie)
cookie = cookie + s_cookie
headers['Cookie'] = cookie
r = requests.get(url3, headers=headers)
r_data = BeautifulSoup(r.text, "html.parser")
print(r_data)
jx_data = r_data.find("div", id="messagetext").find("p").text
if "您需要先登录才能继续本操作" in jx_data:
print("Cookie 失效")
elif "恭喜" in jx_data:
print("签到成功")
elif "不是进行中的任务" in jx_data:
print("今日已签到")
else:
print("签到失败")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kelejuan77/52-crack-automatic-sign-in.git
git@gitee.com:kelejuan77/52-crack-automatic-sign-in.git
kelejuan77
52-crack-automatic-sign-in
52破解自动签到
master

搜索帮助