nlpblogs commited on
Commit
d77506e
·
verified ·
1 Parent(s): 4ba793c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -125,7 +125,8 @@ if st.button("Sentiment Analysis", type="secondary"):
125
  try:
126
  wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#contents #contents")))
127
  comment_elements = driver.find_elements(By.CSS_SELECTOR, "#content #content-text")
128
- comment_date_element = driver.find_element(By.CSS_SELECTOR,'div.author-info time')
 
129
  timestamp = comment_date_element.get_attribute('datetime') # Get timestamp
130
  user_id = 1
131
  for comment_element in comment_elements: # Iterate through comment elements
 
125
  try:
126
  wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#contents #contents")))
127
  comment_elements = driver.find_elements(By.CSS_SELECTOR, "#content #content-text")
128
+ comment_date_element = driver.find_element(By.XPATH, "//div[@class='author-info']//time")
129
+
130
  timestamp = comment_date_element.get_attribute('datetime') # Get timestamp
131
  user_id = 1
132
  for comment_element in comment_elements: # Iterate through comment elements