You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
982 B
28 lines
982 B
1 year ago
|
#!/usr/bin/python3
|
||
|
# -- coding: utf-8 --
|
||
|
# -------------------------------
|
||
|
# @Author : github@wd210010 https://github.com/wd210010/just_for_happy
|
||
|
# @Time : 2023/2/27 13:23
|
||
|
# -------------------------------
|
||
|
# cron "30 6 * * *" script-path=xxx.py,tag=匹配cron用
|
||
|
# const $ = new Env('IKuuu机场签到领流量')
|
||
|
|
||
|
import requests, json,re,os
|
||
|
|
||
|
#https://ikuuu.dev/user登录后cookie
|
||
|
#IKuuu机场签到领流量
|
||
|
ikuuu_cookie = os.getenv("ikuuu_cookie")
|
||
|
|
||
|
url_info = 'https://ikuuu.eu/user/profile'
|
||
|
url = 'https://ikuuu.eu/user/checkin'
|
||
|
headers = {
|
||
|
'cookie': f'{ikuuu_cookie}',
|
||
|
'user-agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
|
||
|
}
|
||
|
html_info = requests.get(url=url_info, headers=headers).text
|
||
|
html = requests.post(url=url, headers=headers)
|
||
|
result = json.loads(html.text)['msg']
|
||
|
info = "".join(re.findall('<div class="d-sm-none d-lg-inline-block">(.*?)</div>', html_info, re.S))
|
||
|
print(info+'\n'+result)
|
||
|
|