diff --git a/crawler/rec/query.py b/crawler/rec/query.py index 600bebb..edeed2c 100644 --- a/crawler/rec/query.py +++ b/crawler/rec/query.py @@ -39,7 +39,7 @@ async def detail_query(detail_id: int): "appVersion": "3.70.0", } url = f"https://api.rightmove.co.uk/api/property/{detail_id}" - async with aiohttp.ClientSession() as session: + async with aiohttp.ClientSession(trust_env=True) as session: async with session.get(url, params=params, headers=headers) as response: if response.status != 200: raise Exception( @@ -106,7 +106,7 @@ async def listing_query( "Connection": "keep-alive", } - async with aiohttp.ClientSession() as session: + async with aiohttp.ClientSession(trust_env=True) as session: async with session.get( "https://api.rightmove.co.uk/api/property-listing", params=params,