Skip to content

Commit

Permalink
fix: class session
Browse files Browse the repository at this point in the history
  • Loading branch information
cullenwatson committed Apr 26, 2024
1 parent c5b15e9 commit fcc8413
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeharvest/core/scrapers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class ScraperInput:


class Scraper:
session = None

def __init__(
self,
scraper_input: ScraperInput,
Expand All @@ -27,7 +29,7 @@ def __init__(
self.location = scraper_input.location
self.listing_type = scraper_input.listing_type

if not session:
if not self.session:
self.session = requests.Session()
self.session.headers.update(
{
Expand Down

0 comments on commit fcc8413

Please sign in to comment.