Compare commits

..

2 Commits

View File

@ -16,12 +16,12 @@ from threading import Lock
from concurrent.futures import ThreadPoolExecutor, as_completed
from logger import logger
db = DBVidcon()
MACHINE_ID = None
MAX_WORKERS = 10
executor = ThreadPoolExecutor(max_workers=MAX_WORKERS)
def get_part_ids(part_num: int, take: int, offset: int = 0):
part_ids = list(range(offset, offset + take))
if max(part_ids) >= part_num:
@ -142,7 +142,9 @@ def post_with_retry(url, proxy_name, json_payload=None, data=None, headers=None,
data=data,
headers=headers,
proxies=proxies,
timeout=timeout
timeout=timeout,
allow_redirects=True, # 允许重定向
verify=False, # 不验证 SSL 证书
)
if resp.status_code == 401 and not token_refreshed:
if verbose: