Spaces:
Running
Running
Update trend_crawl.py
Browse files- trend_crawl.py +1 -1
trend_crawl.py
CHANGED
@@ -38,7 +38,7 @@ def process_selenium_row(index, selenium_rows, driver):
|
|
38 |
selenium_rows = driver.find_elements(By.CSS_SELECTOR, '[jsname="oKdM2c"]')
|
39 |
row = selenium_rows[index]
|
40 |
driver.execute_script("arguments[0].click();", row) # Use JavaScript click for stability
|
41 |
-
|
42 |
# Wait for the articles to load dynamically
|
43 |
WebDriverWait(driver, 10).until(
|
44 |
EC.presence_of_all_elements_located((By.CLASS_NAME, "xZCHj"))
|
|
|
38 |
selenium_rows = driver.find_elements(By.CSS_SELECTOR, '[jsname="oKdM2c"]')
|
39 |
row = selenium_rows[index]
|
40 |
driver.execute_script("arguments[0].click();", row) # Use JavaScript click for stability
|
41 |
+
driver.refresh()
|
42 |
# Wait for the articles to load dynamically
|
43 |
WebDriverWait(driver, 10).until(
|
44 |
EC.presence_of_all_elements_located((By.CLASS_NAME, "xZCHj"))
|