nlpblogs commited on
Commit
8918686
·
verified ·
1 Parent(s): 890ed4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -107,7 +107,7 @@ if st.button("Sentiment Analysis", type="secondary"):
107
  placeholder = st.empty()
108
  progress_bar = st.progress(0)
109
 
110
- for item in range(150):
111
  try:
112
  body = WebDriverWait(driver, 30).until(EC.visibility_of_element_located((By.TAG_NAME, "body")))
113
  body.send_keys(Keys.END)
@@ -127,7 +127,7 @@ 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['comment'].strftime("%Y-%m-%d")
131
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
132
  user_id += 1
133
  data = [dict(t) for t in {tuple(d.items()) for d in data}]
 
107
  placeholder = st.empty()
108
  progress_bar = st.progress(0)
109
 
110
+ for item in range(30):
111
  try:
112
  body = WebDriverWait(driver, 30).until(EC.visibility_of_element_located((By.TAG_NAME, "body")))
113
  body.send_keys(Keys.END)
 
127
  comments = driver.find_elements(By.CSS_SELECTOR, "#content #content-text")
128
  user_id = 1
129
  for comment in comments:
130
+ timestamp = now.strftime("%Y-%m-%d")
131
  data.append({"User ID": user_id, "Comment": comment.text, "comment_date": timestamp})
132
  user_id += 1
133
  data = [dict(t) for t in {tuple(d.items()) for d in data}]