From 0dae14ccfce006cb44d45602b16c29407a2d8b44 Mon Sep 17 00:00:00 2001 From: Cullen Watson Date: Tue, 19 Sep 2023 16:05:14 -0500 Subject: [PATCH 1/2] fix: proxy add to session correctly --- homeharvest/core/scrapers/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/homeharvest/core/scrapers/__init__.py b/homeharvest/core/scrapers/__init__.py index 2bdf972..2f14381 100644 --- a/homeharvest/core/scrapers/__init__.py +++ b/homeharvest/core/scrapers/__init__.py @@ -16,7 +16,14 @@ class Scraper: self.location = scraper_input.location self.listing_type = scraper_input.listing_type - self.session = requests.Session(proxies=scraper_input.proxy) + self.session = requests.Session() + if scraper_input.proxy: + proxy_url = scraper_input.proxy + proxies = { + "http": proxy_url, + "https": proxy_url + } + self.session.proxies.update(proxies) self.listing_type = scraper_input.listing_type self.site_name = scraper_input.site_name From 8f06d46ddb874271f3da299354cb0f3c8f6526a8 Mon Sep 17 00:00:00 2001 From: Cullen Watson Date: Tue, 19 Sep 2023 16:07:06 -0500 Subject: [PATCH 2/2] chore: version number --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e406c31..d5f392a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "homeharvest" -version = "0.2.4" +version = "0.2.5" description = "Real estate scraping library supporting Zillow, Realtor.com & Redfin." authors = ["Zachary Hampton ", "Cullen Watson "] homepage = "https://github.com/ZacharyHampton/HomeHarvest"