From fcc841399c41d372e7bb0c218beedc6211d48c8e Mon Sep 17 00:00:00 2001 From: Cullen Date: Fri, 26 Apr 2024 15:17:44 -0500 Subject: [PATCH] fix: class session --- homeharvest/core/scrapers/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeharvest/core/scrapers/__init__.py b/homeharvest/core/scrapers/__init__.py index a9955e6..1a5f427 100644 --- a/homeharvest/core/scrapers/__init__.py +++ b/homeharvest/core/scrapers/__init__.py @@ -19,6 +19,8 @@ class ScraperInput: class Scraper: + session = None + def __init__( self, scraper_input: ScraperInput, @@ -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( {