Skip to content

Commit

Permalink
🐛 goingtocamp session usage
Browse files Browse the repository at this point in the history
  • Loading branch information
damz committed Apr 29, 2024
1 parent 2eeac5e commit d0339e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions camply/providers/going_to_camp/going_to_camp_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d0339e9

Please sign in to comment.