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"
)
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()