|
|
|
@ -45,14 +45,23 @@ def check(bot, own_id):
|
|
|
|
|
reviews = []
|
|
|
|
|
for review in soup.find_all("div", class_="content"):
|
|
|
|
|
reviews.append(review.get_text())
|
|
|
|
|
reviews.pop(0)
|
|
|
|
|
try:
|
|
|
|
|
reviews.pop(0)
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
# Check if new rev
|
|
|
|
|
old_reviews = read()
|
|
|
|
|
try:
|
|
|
|
|
old_reviews = read()
|
|
|
|
|
except:
|
|
|
|
|
old_reviews = []
|
|
|
|
|
for rev in reviews:
|
|
|
|
|
if rev not in old_reviews:
|
|
|
|
|
new = f"{telebot.formatting.hcode(f'https://ss14top.404.mn/{i}')} \n\n{rev}"
|
|
|
|
|
bot.send_message(own_id, new, parse_mode="HTML")
|
|
|
|
|
try:
|
|
|
|
|
bot.send_message(own_id, new, parse_mode="HTML")
|
|
|
|
|
except:
|
|
|
|
|
bot.send_message(own_id, new)
|
|
|
|
|
|
|
|
|
|
# Write to reviews
|
|
|
|
|
reviews = old_reviews + reviews
|
|
|
|
|