Update app.py
Browse files
app.py
CHANGED
@@ -124,11 +124,11 @@ if st.button("Sentiment Analysis", type="secondary"):
|
|
124 |
data = []
|
125 |
try:
|
126 |
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#contents #contents")))
|
127 |
-
comments = driver.find_elements(By.CSS_SELECTOR, "#content #content-
|
128 |
user_id = 1
|
129 |
for comment in comments:
|
130 |
timestamp = datetime.now().strftime("%Y-%m-%d")
|
131 |
-
data.append({"
|
132 |
user_id += 1
|
133 |
data = [dict(t) for t in {tuple(d.items()) for d in data}]
|
134 |
except Exception as e:
|
|
|
124 |
data = []
|
125 |
try:
|
126 |
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#contents #contents")))
|
127 |
+
comments = driver.find_elements(By.CSS_SELECTOR, "#content #content-name")
|
128 |
user_id = 1
|
129 |
for comment in comments:
|
130 |
timestamp = datetime.now().strftime("%Y-%m-%d")
|
131 |
+
data.append({"Comment": comment.text, "comment_date": timestamp})
|
132 |
user_id += 1
|
133 |
data = [dict(t) for t in {tuple(d.items()) for d in data}]
|
134 |
except Exception as e:
|