mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 13:48:03 +08:00
🔨 修复 【百度贴吧】数量太少签到失败的原因;
🔨 修复 【腾讯视频】错误提示不明确的 BUG。
This commit is contained in:
parent
2c9e623482
commit
b10ceb4e58
@ -31,7 +31,10 @@ class TiebaCheckIn:
|
||||
@staticmethod
|
||||
def tieba_list_more(session):
|
||||
content = session.get(url="http://tieba.baidu.com/f/like/mylike?&pn=1", timeout=(5, 20))
|
||||
pn = int(re.match(r".*/f/like/mylike\?&pn=(.*?)\">尾页.*", content.text, re.S | re.I).group(1))
|
||||
try:
|
||||
pn = int(re.match(r".*/f/like/mylike\?&pn=(.*?)\">尾页.*", content.text, re.S | re.I).group(1))
|
||||
except Exception as e:
|
||||
pn = 1
|
||||
next_page = 1
|
||||
pattern = re.compile(r".*?<a href=\"/f\?kw=.*?title=\"(.*?)\">")
|
||||
while next_page <= pn:
|
||||
|
29
vqq/vqq.py
29
vqq/vqq.py
@ -53,19 +53,22 @@ class VQQCheckIn:
|
||||
url = "https://vip.video.qq.com/fcgi-bin/comm_cgi?name=hierarchical_task_system&cmd=2&_=" + str(this_time)
|
||||
res = requests.get(url=url, headers=headers, cookies=cookies)
|
||||
res.encoding = "utf8"
|
||||
ret = re.search(r'ret": (\d+),', res.text).group(1)
|
||||
if ret == "0":
|
||||
try:
|
||||
value = re.search('checkin_score": (.*?),', res.text).group(1)
|
||||
except Exception as e:
|
||||
print(res.text, e)
|
||||
value = "数据获取失败"
|
||||
msg = f"成长值x{value}"
|
||||
elif "Account Verify Error" in res.text:
|
||||
msg = "签到失败-Cookie失效"
|
||||
elif "Not VIP" in res.text:
|
||||
msg = "非会员无法签到"
|
||||
else:
|
||||
try:
|
||||
ret = re.search(r'ret": (\d+),', res.text).group(1)
|
||||
if ret == "0":
|
||||
try:
|
||||
value = re.search('checkin_score": (.*?),', res.text).group(1)
|
||||
except Exception as e:
|
||||
print(res.text, e)
|
||||
value = "数据获取失败"
|
||||
msg = f"成长值x{value}"
|
||||
elif "Account Verify Error" in res.text:
|
||||
msg = "签到失败-Cookie失效"
|
||||
elif "Not VIP" in res.text:
|
||||
msg = "非会员无法签到"
|
||||
else:
|
||||
msg = res.text
|
||||
except Exception as e:
|
||||
msg = res.text
|
||||
return msg
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user