fix resend after
This commit is contained in:
parent
c88e5e7ab1
commit
7bdebae54a
5
main.py
5
main.py
@ -198,7 +198,6 @@ async def resend_after(msg: Message):
|
||||
tags = tags[tags.index(skip_to_sub):]
|
||||
tag_list = [tuple(t.decode().split()) for t in tags]
|
||||
for i, tag in enumerate(tag_list):
|
||||
logging.info(f'Checking tag {tag} ({i+1}/{len(tag_list)})')
|
||||
# await msg.reply(f'Checking tag <b>{tag}</b> ({i+1}/{len(tag_list)})', parse_mode=ParseMode.HTML)
|
||||
posts = []
|
||||
page = 1
|
||||
@ -210,7 +209,9 @@ async def resend_after(msg: Message):
|
||||
break
|
||||
logging.info(f'{page_posts}')
|
||||
for post in page_posts:
|
||||
if datetime.datetime.fromisoformat(post.created_at).timestamp() < timestamp:
|
||||
post_created_at = datetime.datetime.fromisoformat(post.created_at)
|
||||
logging.info(f'{post_created_at.timestamp()} < {timestamp}')
|
||||
if post_created_at.timestamp() < timestamp:
|
||||
break
|
||||
posts.append(post)
|
||||
page += 1
|
||||
|
Loading…
Reference in New Issue
Block a user