sort tags
This commit is contained in:
parent
10ea63ec40
commit
af5991cf77
1
main.py
1
main.py
@ -26,6 +26,7 @@ dp = Dispatcher(bot)
|
|||||||
async def check_updates():
|
async def check_updates():
|
||||||
async with redis.lock('e621:update'):
|
async with redis.lock('e621:update'):
|
||||||
tag_list = [t.decode() for t in await redis.smembers('e621:subs')]
|
tag_list = [t.decode() for t in await redis.smembers('e621:subs')]
|
||||||
|
tag_list.sort()
|
||||||
for tl_idx in range(0, len(tag_list), 40):
|
for tl_idx in range(0, len(tag_list), 40):
|
||||||
tags = ' '.join(f'~{tag}' for tag in tag_list[tl_idx: tl_idx + 40])
|
tags = ' '.join(f'~{tag}' for tag in tag_list[tl_idx: tl_idx + 40])
|
||||||
posts = await e621.get_posts(tags)
|
posts = await e621.get_posts(tags)
|
||||||
|
Loading…
Reference in New Issue
Block a user