Update app.py
Browse files
app.py
CHANGED
@@ -125,7 +125,8 @@ if st.button("Sentiment Analysis", type="secondary"):
|
|
125 |
try:
|
126 |
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#contents #contents")))
|
127 |
comment_elements = driver.find_elements(By.CSS_SELECTOR, "#content #content-text")
|
128 |
-
comment_date_element = driver.find_element(By.
|
|
|
129 |
timestamp = comment_date_element.get_attribute('datetime') # Get timestamp
|
130 |
user_id = 1
|
131 |
for comment_element in comment_elements: # Iterate through comment elements
|
|
|
125 |
try:
|
126 |
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#contents #contents")))
|
127 |
comment_elements = driver.find_elements(By.CSS_SELECTOR, "#content #content-text")
|
128 |
+
comment_date_element = driver.find_element(By.XPATH, "//div[@class='author-info']//time")
|
129 |
+
|
130 |
timestamp = comment_date_element.get_attribute('datetime') # Get timestamp
|
131 |
user_id = 1
|
132 |
for comment_element in comment_elements: # Iterate through comment elements
|