[~] Refactor

This commit is contained in:
Siarhei Siniak 2024-07-06 14:30:27 +03:00
parent 75f41b03db
commit 858332d657

@ -57,6 +57,8 @@ async def tiktok_videos_links_get(
r'https://www.tiktok.com/@\w+/video/\d+' r'https://www.tiktok.com/@\w+/video/\d+'
).findall(content) ).findall(content)
old_size = len(links)
for o in new_links: for o in new_links:
links.add(o) links.add(o)
@ -69,6 +71,7 @@ async def tiktok_videos_links_get(
if elapsed > max_time: if elapsed > max_time:
break; break;
if old_size < len(links):
logger.info(json.dumps(dict( logger.info(json.dumps(dict(
total=len(links), total=len(links),
elapsed=elapsed, elapsed=elapsed,