Add1E commited on
Commit
2dd9e21
·
verified ·
1 Parent(s): 2dc16bf

Update trend_crawl2.py

Browse files
Files changed (1) hide show
  1. trend_crawl2.py +1 -1
trend_crawl2.py CHANGED
@@ -34,7 +34,7 @@ def click_and_scrape(driver, url):
34
  try:
35
  # Write the page source into an HTML file
36
  with open("output.html", "w", encoding="utf-8") as file:
37
- file.write(page_source)
38
 
39
  print("Page source has been written to output.html.")
40
  button = WebDriverWait(driver, 20).until(
 
34
  try:
35
  # Write the page source into an HTML file
36
  with open("output.html", "w", encoding="utf-8") as file:
37
+ file.write(driver.page_source)
38
 
39
  print("Page source has been written to output.html.")
40
  button = WebDriverWait(driver, 20).until(