Skip to content

Commit 7e8fc84

Browse files
authored
Update TensorScraper.py
1 parent ee60fd7 commit 7e8fc84

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

TensorScraper.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,21 @@
1414
def save_webpage(url, filename):
1515
"""Save webpage source to a file."""
1616
# Create a new instance of the Chrome driver
17-
driver = webdriver.Chrome()
17+
options = webdriver.ChromeOptions() # Create a ChromeOptions object
18+
options.add_argument("--enable-chrome-browser-cloud-management")
19+
options.add_argument("--log-level=3") # This sets the log level to suppress warnings
20+
21+
22+
driver = webdriver.Chrome(options=options)
23+
24+
1825

1926
try:
2027
# Open the webpage
2128
driver.get(url)
2229

2330
# Wait for user confirmation
24-
input("Press Enter when ready to save the webpage...")
31+
input("#"*50+"\nPress Enter when ready to save the webpage...\n")
2532
time.sleep(WAIT_TIME) # Let the page load completely
2633

2734
# Get the page source

0 commit comments

Comments
 (0)