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 0c25fbf

Browse files
Update README.md
1 parent 29fa0aa commit 0c25fbf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ If everything is working correctly, it will return an IP address of a proxy that
4949

5050
## Full Code
5151
```python
52-
import re
53-
52+
from selenium.webdriver.common.by import By
5453
from seleniumwire import webdriver
5554
# A package to have a chromedriver always up-to-date.
5655
from webdriver_manager.chrome import ChromeDriverManager
@@ -80,7 +79,7 @@ def execute_driver():
8079
)
8180
try:
8281
driver.get("https://ip.oxylabs.io/")
83-
return f'\nYour IP is: {driver.find_element_by_css_selector("pre").text}'
82+
return f'\nYour IP is: {driver.find_element(By.CSS_SELECTOR, "pre").text}'
8483
finally:
8584
driver.quit()
8685

0 commit comments

Comments
(0)

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