修正获取抖音视频数据失败

前后计算 User-Agent 不一致导致
This commit is contained in:
Max Sky 2023-04-05 17:27:25 +08:00 committed by GitHub
parent a5c4205138
commit 603c388ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ class Scraper:
# 初始化/initialization
def __init__(self):
self.headers = {
'User-Agent': "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36 Edg/87.0.664.66"
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
}
self.douyin_api_headers = {
'accept-encoding': 'gzip, deflate, br',