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): """北京公博"""