fix: class session
parent
c5b15e9be5
commit
fcc841399c
|
@ -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(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue