修改一些bug

This commit is contained in:
rm 2023-12-27 11:09:52 +08:00
parent 9405d8f929
commit 3d158a8127
1 changed files with 5 additions and 4 deletions

View File

@ -8,13 +8,15 @@ import requests
import toml
from bs4 import BeautifulSoup
'''
0 0 15 * * ?
'''
class PtOperation:
def __init__(self):
logger.add("../log/PtOperation.log", rotation="500 MB", level="INFO")
logger.add(sys.stderr, level="INFO")
self.toml_file = 'pt_config.toml'
self.toml_file = 'PT/pt_config.toml'
self.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.7',
'accept-language': 'zh,zh-CN;q=0.9',
@ -126,8 +128,7 @@ class PtOperation:
url, cookie = section_data.get('url'), section_data.get('cookie')
if len(cookie.strip()) > 0:
# 签到
# self.attendances(section_name, url, cookie)
pass
self.attendances(section_name, url, cookie)
else:
# 检测是否可以注册
self.signup(section_name, url)