-
Notifications
You must be signed in to change notification settings - Fork 65
/
52pojieCheckIn.py
35 lines (29 loc) · 1.18 KB
/
52pojieCheckIn.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf8 -*-
import requests
from bs4 import BeautifulSoup
cookie = '' # 配置你的cookie
sckey = '' # 配置你的server酱SCKEY
def pushinfo(info,specific):
headers={
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36',
'ContentType': 'text/html'
}
requests.session().get("https://sc.ftqq.com/"+sckey+".send?text=" + info + "&desp=" + specific,headers=headers)
def main(*args):
headers={
'Cookie': cookie,
'ContentType':'text/html;charset=gbk'
}
requests.session().get('https://www.52pojie.cn/home.php?mod=task&do=apply&id=2',headers=headers)
a=requests.session().get('https://www.52pojie.cn/home.php?mod=task&do=draw&id=2',headers=headers)
b=BeautifulSoup(a.text,'html.parser')
c=b.find('div',id='messagetext').find('p').text
if "您需要先登录才能继续本操作" in c:
pushinfo("Cookie失效", c)
elif "恭喜" in c:
pushinfo("吾爱破解签到成功",c)
else:
pushinfo("吾爱破解签到失败",c)
print(c)
if __name__ == '__main__':
main()