Update app.py
Browse files
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
|