From efcd030e95a51f02284498d021195ac9f8fd987b Mon Sep 17 00:00:00 2001 From: xingc Date: Wed, 13 Aug 2025 19:08:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(card):=20=E4=BF=AE=E5=A4=8D`psa`=E6=90=9C?= =?UTF-8?q?=E5=8D=A1=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/routers/card/scraper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/routers/card/scraper.py b/core/routers/card/scraper.py index 8062616..38c3971 100644 --- a/core/routers/card/scraper.py +++ b/core/routers/card/scraper.py @@ -25,7 +25,7 @@ logger = logging.getLogger(__name__) class SiteApi: def __init__(self): self.user_agent = UserAgent( - browsers=['Google', 'Chrome', 'Firefox', 'Edge', 'Safari'], + browsers=['Google', 'Chrome', 'Edge'], os=['Windows', 'Mac OS X'], platforms=['desktop'], min_version=127.0 @@ -94,7 +94,7 @@ class SiteApi: 'Origin': 'https://www.psacard.com', 'Referer': f'https://www.psacard.com/cert/{cert_number}', } - r = await self.get(url, headers=headers, impersonate="chrome131", use_abroad_proxy=True) + r = await self.get(url, headers=headers, impersonate="chrome110") chck_string = 'Just a moment...' if chck_string in r.text: raise SearchCardRetry(chck_string) @@ -129,7 +129,7 @@ class SiteApi: headers = { 'referer': 'https://www.cgccards.com/' } - return await self.get(url, headers=headers) + return await self.get(url, headers=headers, impersonate="chrome110") async def gbtc(self, cert_number: str | int): """北京公博"""