Monsia commited on
Commit
782be8b
·
1 Parent(s): 8bfa348

fix: scraper bug

Browse files
Files changed (1) hide show
  1. scrape_data.py +2 -2
scrape_data.py CHANGED
@@ -53,8 +53,8 @@ def scrap_articles(
53
  submit_btn.click()
54
 
55
  dates = driver.find_elements(By.CLASS_NAME, "sp1")
56
- titles = driver.find_elements(By.XPATH, "//td/a")
57
-
58
  articles = []
59
  for i in range(len(titles)):
60
  art = {
 
53
  submit_btn.click()
54
 
55
  dates = driver.find_elements(By.CLASS_NAME, "sp1")
56
+ table = driver.find_element(By.ID, "tabQuotes")
57
+ titles = table.find_elements(By.TAG_NAME, "a")
58
  articles = []
59
  for i in range(len(titles)):
60
  art = {