nlpblogs commited on
Commit
2e17dbc
·
verified ·
1 Parent(s): 0900d1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -128,7 +128,10 @@ if st.button("Sentiment Analysis", type="secondary"):
128
 
129
  user_id = 1
130
  for comment in comments:
131
- timestamp = comment.find_element(By.CSS_SELECTOR, '.time').text
 
 
 
132
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
133
  user_id += 1
134
  data = [dict(t) for t in {tuple(d.items()) for d in data}]
 
128
 
129
  user_id = 1
130
  for comment in comments:
131
+
132
+ timestamp1 = driver.find_element(By.CSS_SELECTOR, 'div.author-info time')
133
+ timestamp = timestamp1.get_attribute('datetime')
134
+ st.write(timestamp)
135
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
136
  user_id += 1
137
  data = [dict(t) for t in {tuple(d.items()) for d in data}]