From d0339e9c5f2d641ce757557704458d3ada358bb5 Mon Sep 17 00:00:00 2001 From: Damien Tournoud Date: Mon, 29 Apr 2024 15:00:46 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20goingtocamp=20session=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #342 --- camply/providers/going_to_camp/going_to_camp_provider.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/camply/providers/going_to_camp/going_to_camp_provider.py b/camply/providers/going_to_camp/going_to_camp_provider.py index 1f596048..506a70ff 100644 --- a/camply/providers/going_to_camp/going_to_camp_provider.py +++ b/camply/providers/going_to_camp/going_to_camp_provider.py @@ -8,7 +8,6 @@ from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union -import requests from fake_useragent import UserAgent from pydantic import ValidationError @@ -339,7 +338,7 @@ def _api_request( "User-Agent": UserAgent(browsers=["chrome"]).random, "Accept-Language": "en-US,en;q=0.9", } - response = requests.get(url=url, headers=headers, params=params, timeout=30) + response = self.session.get(url=url, headers=headers, params=params, timeout=30) if response.ok is False: error_message = f"Receiving bad data from GoingToCamp API: status_code: {response.status_code}: {response.text}" logger.error(error_message)