nlpblogs commited on
Commit
3a628d9
·
verified ·
1 Parent(s): 6901dd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -127,7 +127,10 @@ if st.button("Sentiment Analysis", type="secondary"):
127
  comments = driver.find_elements(By.CSS_SELECTOR, "#content #content-text")
128
  user_id = 1
129
  for comment in comments:
130
- timestamp = datetime.now().strftime("%Y-%m-%d")
 
 
 
131
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
132
 
133
 
 
127
  comments = driver.find_elements(By.CSS_SELECTOR, "#content #content-text")
128
  user_id = 1
129
  for comment in comments:
130
+
131
+
132
+ timestamp=comments.find_elements_by_xpath('//*[contains(@class,"yt-simple-endpoint style-scope yt-formatted-string")]')
133
+
134
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
135
 
136