nlpblogs commited on
Commit
76a4123
·
verified ·
1 Parent(s): a2c8a86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -128,8 +128,9 @@ if st.button("Sentiment Analysis", type="secondary"):
128
 
129
  user_id = 1
130
  for comment in comments:
131
- views = comment.find_element_by_xpath('.//*[@id="metadata-line"]/span[1]').text
132
- timestamp = comment.find_element_by_xpath('.//*[@id="metadata-line"]/span[2]').text
 
133
 
134
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
135
  user_id += 1
 
128
 
129
  user_id = 1
130
  for comment in comments:
131
+ views = comment.find_element_by_xpath(by=By.XPATH, './/*[@id="metadata-line"]/span[1]').text
132
+ timestamp = comment.find_element_by_xpath(by=By.XPATH, './/*[@id="metadata-line"]/span[2]').text
133
+
134
 
135
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
136
  user_id += 1