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