Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1c544de

Browse files
author
oxyjonas
committed
update selector
remove regex and replace it with css selector for printing out the output
1 parent 449cb17 commit 1c544de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def execute_driver():
3131
)
3232
try:
3333
driver.get("https://ip.oxylabs.io/")
34-
return f'\nYour IP is: {re.search(r"[0-9].{2,}", driver.page_source).group()}'
34+
return f'\nYour IP is: {driver.find_element_by_css_selector("pre").text}'
3535
finally:
3636
driver.quit()
3737

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /