From dd726170c19e3d062c4da11423bffdf61edb671e Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 25 Jul 2023 16:12:43 -0700 Subject: feat(html): sort lists --- src/due/html.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/due/html.py b/src/due/html.py index eba7e8b..0cc4c74 100644 --- a/src/due/html.py +++ b/src/due/html.py @@ -3,10 +3,20 @@ import joblib from due.cache import cache from flask import request import math +import re + + +def seen(element): + match = re.search(r"\s(\d+)\s", element) + + if match: + return int(match.group(1)) + else: + return 0 def anime_to_html(releasing_outdated_anime): - current_html = "", len(ids)) + current_html.insert(0, "") + + return ("".join(current_html), len(ids)) def manga_to_html(releasing_outdated_manga): - current_html = ["