feat: 添加项目配置文件和日志文件以支持新模块的设置
This commit is contained in:
parent
81412f52fc
commit
50a7b283e0
6
main.py
6
main.py
@ -16,12 +16,12 @@ from threading import Lock
|
|||||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||||
from logger import logger
|
from logger import logger
|
||||||
|
|
||||||
|
|
||||||
db = DBVidcon()
|
db = DBVidcon()
|
||||||
MACHINE_ID = None
|
MACHINE_ID = None
|
||||||
MAX_WORKERS = 10
|
MAX_WORKERS = 10
|
||||||
executor = ThreadPoolExecutor(max_workers=MAX_WORKERS)
|
executor = ThreadPoolExecutor(max_workers=MAX_WORKERS)
|
||||||
|
|
||||||
|
|
||||||
def get_part_ids(part_num: int, take: int, offset: int = 0):
|
def get_part_ids(part_num: int, take: int, offset: int = 0):
|
||||||
part_ids = list(range(offset, offset + take))
|
part_ids = list(range(offset, offset + take))
|
||||||
if max(part_ids) >= part_num:
|
if max(part_ids) >= part_num:
|
||||||
@ -143,8 +143,8 @@ def post_with_retry(url, proxy_name, json_payload=None, data=None, headers=None,
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
proxies=proxies,
|
proxies=proxies,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
allow_redirects=True, # 允许重定向
|
allow_redirects=True, # 允许重定向
|
||||||
verify=False, # 不验证 SSL 证书
|
verify=False, # 不验证 SSL 证书
|
||||||
)
|
)
|
||||||
if resp.status_code == 401 and not token_refreshed:
|
if resp.status_code == 401 and not token_refreshed:
|
||||||
if verbose:
|
if verbose:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user