From 22db6a303cac0f03f0638e6d417794090c138f15 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 7 Feb 2025 22:03:44 -0500 Subject: [PATCH 1/4] Add more proxy schemes --- seleniumbase/core/proxy_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seleniumbase/core/proxy_helper.py b/seleniumbase/core/proxy_helper.py index c1838b2a885..e1f18a984da 100644 --- a/seleniumbase/core/proxy_helper.py +++ b/seleniumbase/core/proxy_helper.py @@ -40,7 +40,7 @@ def create_proxy_ext( """ mode: "fixed_servers",\n""" """ rules: {\n""" """ singleProxy: {\n""" - """ scheme: "http",\n""" + """ scheme: ["http", "https", "socks4", "socks5"],\n""" """ host: "%s",\n""" """ port: parseInt("%s")\n""" """ },\n""" From 4190430446fd1916a8ed84cce8f496e1df3aa4d3 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 7 Feb 2025 22:04:17 -0500 Subject: [PATCH 2/4] Update the sample proxy list --- seleniumbase/config/proxy_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seleniumbase/config/proxy_list.py b/seleniumbase/config/proxy_list.py index bd9cb1f2723..fd5c289a5d8 100644 --- a/seleniumbase/config/proxy_list.py +++ b/seleniumbase/config/proxy_list.py @@ -23,8 +23,8 @@ """ PROXY_LIST = { - "example1": "35.185.196.38:3128", # (Example) - set your own proxy here - "example2": "129.80.134.71:3128", # (Example) + "example1": "98.8.195.160:443", # (Example) - set your own proxy here + "example2": "200.174.198.86:8888", # (Example) "example3": "socks5://184.178.172.5:15303", # (Example) "proxy1": None, "proxy2": None, From a40d4bb8bdd1ad8f71ba92eec9dd11d2ab0f0071 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 7 Feb 2025 22:04:44 -0500 Subject: [PATCH 3/4] Update the proxy test --- examples/proxy_test.py | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/examples/proxy_test.py b/examples/proxy_test.py index 08088617338..fcb7cf59ea2 100644 --- a/examples/proxy_test.py +++ b/examples/proxy_test.py @@ -16,27 +16,19 @@ def test_proxy(self): self.open("https://api.ipify.org/") ip_address = self.get_text("body") self.open("https://ipinfo.io/") - self.type('input[name="search"]', ip_address, timeout=20) - self.click("form button span") - self.sleep(2) - self.click_if_visible("span.cursor-pointer", timeout=4) + self.type('input[name="search"]\n', ip_address, timeout=20) print("\n\nMy IP Address = %s\n" % ip_address) + self.wait_for_text("IP Address", "h1", timeout=20) + self.wait_for_element_present('[href="/signup"]') + self.wait_for_text("hostname", timeout=20) + self.highlight("h1") + self.sleep(1.5) print("Displaying Host Info:") - text = self.get_text("#block-summary").split("Hosted domains")[0] + text = self.get_text("#api-preview-widget").split("is_anycast:")[0] rows = text.split("\n") data = [] for row in rows: if row.strip() != "": data.append(row.strip()) - print("\n".join(data).replace('\n"', " ")) - print("\nDisplaying Geolocation Info:") - text = self.get_text("#block-geolocation").split("Coordinates")[0] - rows = text.split("\n") - data = [] - for row in rows: - if row.strip() != "": - data.append(row.strip()) - print("\n".join(data).replace('\n"', " ")) - if not self.headless: - print("\nThe browser will close automatically in 3 seconds...") - self.sleep(3) + print("\n".join(data).replace('\n"', ' "')) + self.sleep(3) From 067e29c67de7b69c5542004d33c9cdb543f428d1 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 7 Feb 2025 22:05:21 -0500 Subject: [PATCH 4/4] Version 4.34.11 --- seleniumbase/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index c932c3b534e..1bfc319a007 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.34.10" +__version__ = "4.34.11"