This commit is contained in:
zjf 2025-05-27 19:04:57 +08:00
parent c43d8652fb
commit b353ae81bb
1 changed files with 6 additions and 4 deletions

View File

@ -70,7 +70,6 @@ headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Origin': 'https://live.douyin.com', 'Origin': 'https://live.douyin.com',
'Priority': 'u=1, i', 'Priority': 'u=1, i',
'Referer': 'https://live.douyin.com/837842834415',
'Sec-Ch-Ua': '"Chromium";v="136", "Microsoft Edge";v="136", "Not.A/Brand";v="99"', 'Sec-Ch-Ua': '"Chromium";v="136", "Microsoft Edge";v="136", "Not.A/Brand";v="99"',
'Sec-Ch-Ua-Mobile': '?0', 'Sec-Ch-Ua-Mobile': '?0',
'Sec-Ch-Ua-Platform': '"Windows"', 'Sec-Ch-Ua-Platform': '"Windows"',
@ -115,8 +114,11 @@ async def handle_response(custom_param, response):
try: try:
json_data = await response.json() json_data = await response.json()
logger.debug(f"json_data:{json.dumps(json_data, indent=2, ensure_ascii=False)}") logger.debug(f"json_data:{json.dumps(json_data, indent=2, ensure_ascii=False)}")
if "top_promotion" in json_data:
logger.debug(f'top_promotion:{json_data["top_promotion"]}') logger.debug(f'top_promotion:{json_data["top_promotion"]}')
if "promotions" in json_data:
logger.debug(f'promotions:{json_data["promotions"]}') logger.debug(f'promotions:{json_data["promotions"]}')
if "total" in json_data:
logger.debug(f'total:{json_data["total"]}') logger.debug(f'total:{json_data["total"]}')
except: except:
logger.debug("Non-JSON response") logger.debug("Non-JSON response")