Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions examples/proxy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.34.10"
__version__ = "4.34.11"
4 changes: 2 additions & 2 deletions seleniumbase/config/proxy_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/core/proxy_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down