refactor: move proxy to session

This commit is contained in:
Cullen Watson
2023-09-19 15:48:46 -05:00
parent 5f31beda46
commit 1f0feb836d
4 changed files with 10 additions and 11 deletions

View File

@@ -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()