fix: class session

pull/75/head
Cullen 2024-04-26 15:17:44 -05:00
parent c5b15e9be5
commit fcc841399c
1 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,8 @@ class ScraperInput:
class Scraper: class Scraper:
session = None
def __init__( def __init__(
self, self,
scraper_input: ScraperInput, scraper_input: ScraperInput,
@ -27,7 +29,7 @@ class Scraper:
self.location = scraper_input.location self.location = scraper_input.location
self.listing_type = scraper_input.listing_type self.listing_type = scraper_input.listing_type
if not session: if not self.session:
self.session = requests.Session() self.session = requests.Session()
self.session.headers.update( self.session.headers.update(
{ {