🔨 修复 【百度贴吧】数量太少签到失败的原因;

🔨 修复 【腾讯视频】错误提示不明确的 BUG。
This commit is contained in:
Sitoi 2021-04-14 10:26:06 +08:00
parent 2c9e623482
commit b10ceb4e58
2 changed files with 20 additions and 14 deletions

View File

@ -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))
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:

View File

@ -53,6 +53,7 @@ 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"
try:
ret = re.search(r'ret": (\d+),', res.text).group(1)
if ret == "0":
try:
@ -67,6 +68,8 @@ class VQQCheckIn:
msg = "非会员无法签到"
else:
msg = res.text
except Exception as e:
msg = res.text
return msg
@staticmethod