From 8e8ee70cbcf83089b9c8169066c9fc305ebbeaec Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 1 Oct 2023 18:09:00 +0200 Subject: [PATCH] List all eps on conan eps --- commands/conan-eps.py | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/commands/conan-eps.py b/commands/conan-eps.py index 3199474..df80adf 100755 --- a/commands/conan-eps.py +++ b/commands/conan-eps.py @@ -10,8 +10,7 @@ WIKI_URL = ( "https://fr.wikipedia.org/wiki/Liste_des_%C3%A9pisodes_de_D%C3%A9tective_Conan" ) GOOD_COLOR = ["#ee8000", "#90bdff"] -CSV_COLUMNS = ["SW", "EW", "Arc", "ST", "ET", "Titre", "Date"] -VF_UNTIL = 219 +CSV_COLUMNS = ["SW", "EW", "Arc", "ST", "ET", "Type", "Titre", "Date"] EPS_BY_SEASONS = [ 28, @@ -123,21 +122,18 @@ for season, table in enumerate(tables): except ValueError: continue - if episode <= VF_UNTIL: - continue - color = extract_background(tr["style"]) - if not color or color in GOOD_COLOR: - out.writerow( - { - "SW": season, - "EW": episode, - "Arc": current_arc(episode), - "ST": thetvdb_season(episode), - "ET": thetvdb_episode(episode), - "Titre": tds[1].text.strip(), - "Date": tds[4].text.strip(), - } - ) - sys.stdout.flush() + out.writerow( + { + "SW": season, + "EW": episode, + "Arc": current_arc(episode), + "ST": thetvdb_season(episode), + "ET": thetvdb_episode(episode), + "Type": "C" if not color or color in GOOD_COLOR else "F", + "Titre": tds[1].text.strip(), + "Date": tds[4].text.strip(), + } + ) + sys.stdout.flush()