diff options
| author | Fuwn <[email protected]> | 2023-07-25 15:30:00 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-07-25 15:30:00 -0700 |
| commit | b7b94f1a746d40ce380446a01e1ef5e2d73d662d (patch) | |
| tree | cdff4d08b4eb186e4f78a232a2fb4b70c6767bed /src | |
| parent | docs(index): refresh token functionality (diff) | |
| download | old.due.moe-b7b94f1a746d40ce380446a01e1ef5e2d73d662d.tar.xz old.due.moe-b7b94f1a746d40ce380446a01e1ef5e2d73d662d.zip | |
fix(html): fix ruridragon edge cases
Diffstat (limited to 'src')
| -rw-r--r-- | src/due/html.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/due/html.py b/src/due/html.py index 93d1e58..519adfe 100644 --- a/src/due/html.py +++ b/src/due/html.py @@ -2,6 +2,7 @@ import requests import joblib from due.cache import cache from flask import request +import math def anime_to_html(releasing_outdated_anime): @@ -106,12 +107,32 @@ def manga_to_html(releasing_outdated_manga): except Exception: available = "?" + if not str(available)[0].isdigit(): + if len(manga_chapter_aggregate["volumes"]) == 0: + titles.pop() + + return + + available = math.floor( + float( + list(manga_chapter_aggregate["volumes"]["1"]["chapters"])[0] + ) + ) + if str(progress) == str(available): titles.pop() return + # Useful when debugging + # if str(available)[0].isdigit(): + # titles.pop() + + # return + if str(available)[0] == "{": + titles.pop() + return available_link = ( |