add more testing stuff

This commit is contained in:
Vxrtrauter
2025-10-18 01:08:36 +02:00
parent 5637e80657
commit 1cab671a13
2 changed files with 7 additions and 9 deletions
+6 -5
View File
@@ -12,14 +12,15 @@ def scrape_monkrus_telegram():
print(response.status_code) # rm later
soup = BeautifulSoup(response.text, "html.parser")
posts = soup.find_all("div", class_=["tgme_widget_message_wrap js-widget_message_wrap", "tgme_widget_message_wrap js-widget_message_wrap date_visible"])
bubbles = soup.find_all("div", class_="tgme_widget_message_bubble")
for post in posts:
posts_txt = post.find("div", class_="tgme_widget_message_text js-message_text") # this doesnt work
for bubble in bubbles:
post_txt = bubble.find("div", class_="tgme_widget_message_text js-message_text") # this doesnt work
if post_txt.b:
posts.append(Post(text=post_txt.get_text()))
print(posts_txt)
print(post_txt.b.text)
+1 -4
View File
@@ -23,7 +23,4 @@ state = AppState(posts=[], post_titles=[], post_urls=[], post_author=[], downloa
@dataclass
class Post:
id: int
title: str
url: str
author: str
text: str