mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-07 13:04:30 -08:00
refactor: move proxy to session
This commit is contained in:
@@ -39,7 +39,6 @@ class RealtorScraper(Scraper):
|
||||
"https://parser-external.geo.moveaws.com/suggest",
|
||||
params=params,
|
||||
headers=headers,
|
||||
proxies=self.proxy,
|
||||
)
|
||||
response_json = response.json()
|
||||
|
||||
@@ -105,7 +104,7 @@ class RealtorScraper(Scraper):
|
||||
"variables": variables,
|
||||
}
|
||||
|
||||
response = self.session.post(self.search_url, json=payload, proxies=self.proxy)
|
||||
response = self.session.post(self.search_url, json=payload)
|
||||
response_json = response.json()
|
||||
|
||||
property_info = response_json["data"]["property"]
|
||||
@@ -218,7 +217,7 @@ class RealtorScraper(Scraper):
|
||||
"variables": variables,
|
||||
}
|
||||
|
||||
response = self.session.post(self.search_url, json=payload, proxies=self.proxy)
|
||||
response = self.session.post(self.search_url, json=payload)
|
||||
response.raise_for_status()
|
||||
response_json = response.json()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user