Mythus commited on
Commit
ddc056f
·
verified ·
1 Parent(s): e94b504

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +7 -22
run.py CHANGED
@@ -1,23 +1,8 @@
1
- import undetected_chromedriver as uc
2
- from seleniumbase import BaseCase
3
 
4
- class OpenLinkTest(BaseCase):
5
- def test_open_link(self):
6
- # Initialize undetected ChromeDriver
7
- options = uc.ChromeOptions()
8
- driver = uc.Chrome(options=options)
9
-
10
- # Open the provided link
11
- url = "https://d000d.com/e/9b3w45p3h2gz"
12
- driver.get(url)
13
-
14
- # Add any additional actions or assertions here if needed
15
- print("Page title is:", driver.title)
16
-
17
- # Close the driver
18
- driver.quit()
19
-
20
- # Run the test
21
- if __name__ == "__main__":
22
- test = OpenLinkTest()
23
- test.test_open_link()
 
1
+ from seleniumbase import Driver
 
2
 
3
+ driver = Driver(uc=True)
4
+ url = "https://d000d.com/e/9b3w45p3h2gz"
5
+ driver.uc_open_with_reconnect(url, 4)
6
+ html_content = driver.page_source
7
+ print(html_content)
8
+ driver.quit()