nlpblogs commited on
Commit
c1e654b
·
verified ·
1 Parent(s): 2096041

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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-text")
128
  user_id = 1
129
  for comment in comments:
130
  timestamp = datetime.now().strftime("%Y-%m-%d")
131
- data.append({"User ID": user_name, "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:
 
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: