🗑️ 分离 headers

This commit is contained in:
xtaodada 2022-09-25 18:23:07 +08:00
parent 01567e55a6
commit 40432a1164
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 2 additions and 2 deletions

View File

@ -11,6 +11,7 @@ from io import BytesIO
from PIL import Image, ImageDraw, ImageFont from PIL import Image, ImageDraw, ImageFont
from defs.browser import get_browser from defs.browser import get_browser
from headers import headers
def cut_text(old_str, cut): def cut_text(old_str, cut):
@ -188,8 +189,6 @@ def binfo_image_create(video_info: dict):
# UP主 # UP主
# 等级 0-4 \uE6CB-F 5-6\uE6D0-1 # 等级 0-4 \uE6CB-F 5-6\uE6D0-1
# UP \uE723 # UP \uE723
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'}
if "staff" in video_info["data"]: if "staff" in video_info["data"]:
up_list = [] up_list = []
for up in video_info["data"]["staff"]: for up in video_info["data"]["staff"]:

1
headers.py Normal file
View File

@ -0,0 +1 @@
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'}