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) 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" 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, 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"""