Spaces:
Paused
Paused
Download script.py from Mythus/CloudfareTest: direct link, hf CLI and curl.
- Browser
- Download file 676 Bytes
-
https://huggingface.co/spaces/Mythus/CloudfareTest/resolve/main/script.py
- Command line
-
hf download hf://spaces/Mythus/CloudfareTest/script.py
-
curl -L -o script.py https://huggingface.co/spaces/Mythus/CloudfareTest/resolve/main/script.py
676 Bytes
| import time | |
| import undetected_chromedriver as uc | |
| from selenium.webdriver.common.by import By | |
| from seleniumbase import BaseCase | |
| class MyTestClass(BaseCase): | |
| def test_basic(self): | |
| options = uc.ChromeOptions() | |
| # Uncomment the line below if you'd like to use a headless browser | |
| # options.headless=True | |
| driver = uc.Chrome(options=options) | |
| driver.get("https://d000d.com/e/9b3w45p3h2gz") | |
| time.sleep(5) # wait 5 seconds before getting the page source | |
| print(driver.page_source) # print the page source | |
| driver.quit() | |
| if __name__ == '__main__': | |
| case = MyTestClass() | |
| case.test_basic() | |