From 603c388ed344da615ffaf5e828b86bb72a4e6e4a Mon Sep 17 00:00:00 2001 From: Max Sky Date: Wed, 5 Apr 2023 17:27:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=8E=B7=E5=8F=96=E6=8A=96?= =?UTF-8?q?=E9=9F=B3=E8=A7=86=E9=A2=91=E6=95=B0=E6=8D=AE=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 前后计算 User-Agent 不一致导致 --- scraper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraper.py b/scraper.py index 3b6866c..a9edab5 100644 --- a/scraper.py +++ b/scraper.py @@ -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',