List all eps on conan eps
Some checks failed
dl / lint (push) Failing after 1m45s
dl / docker (push) Has been skipped

This commit is contained in:
Michel Roux 2023-10-01 18:09:00 +02:00
parent f0088cba15
commit 8e8ee70cbc

View File

@ -10,8 +10,7 @@ WIKI_URL = (
"https://fr.wikipedia.org/wiki/Liste_des_%C3%A9pisodes_de_D%C3%A9tective_Conan" "https://fr.wikipedia.org/wiki/Liste_des_%C3%A9pisodes_de_D%C3%A9tective_Conan"
) )
GOOD_COLOR = ["#ee8000", "#90bdff"] GOOD_COLOR = ["#ee8000", "#90bdff"]
CSV_COLUMNS = ["SW", "EW", "Arc", "ST", "ET", "Titre", "Date"] CSV_COLUMNS = ["SW", "EW", "Arc", "ST", "ET", "Type", "Titre", "Date"]
VF_UNTIL = 219
EPS_BY_SEASONS = [ EPS_BY_SEASONS = [
28, 28,
@ -123,21 +122,18 @@ for season, table in enumerate(tables):
except ValueError: except ValueError:
continue continue
if episode <= VF_UNTIL:
continue
color = extract_background(tr["style"]) color = extract_background(tr["style"])
if not color or color in GOOD_COLOR: out.writerow(
out.writerow( {
{ "SW": season,
"SW": season, "EW": episode,
"EW": episode, "Arc": current_arc(episode),
"Arc": current_arc(episode), "ST": thetvdb_season(episode),
"ST": thetvdb_season(episode), "ET": thetvdb_episode(episode),
"ET": thetvdb_episode(episode), "Type": "C" if not color or color in GOOD_COLOR else "F",
"Titre": tds[1].text.strip(), "Titre": tds[1].text.strip(),
"Date": tds[4].text.strip(), "Date": tds[4].text.strip(),
} }
) )
sys.stdout.flush() sys.stdout.flush()