fixed s 8

This commit is contained in:
bparodi@lezzo.org 2024-11-05 14:44:10 +01:00
parent c2109a5bba
commit 8c1530f39f
2 changed files with 318 additions and 315 deletions

624
8.txt

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,7 @@ from collections import namedtuple
Finito = namedtuple('Finito', ['Number', 'Date', 'Title'])
def parse_wiki_source(wiki_source, ep_):
def parse_wiki_source(wiki_source, stagione):
Episode = namedtuple('Episode', ['N_tot', 'N', 'Prima_TV_ita', 'Nome_della_puntata'])
pattern = re.compile(
@ -20,11 +20,14 @@ def parse_wiki_source(wiki_source, ep_):
episodes = []
for match in matches:
if ep_ not in {13, 14, 15, 16, 17}:
print(f'----------------------- {list(match)}')
if stagione == 8:
n_tot, prima_tv_ita, nome_della_puntata, n = match
elif stagione not in {13, 14, 15, 16, 17}:
n_tot, n, prima_tv_ita, nome_della_puntata = match
else:
n_tot, nome_della_puntata, prima_tv_ita, n = [m.strip() for m in match]
if n.endswith('2011') or n.endswith('2012'): # or n.endswith('2013') or n.endswith('2014') or n.endswith('2016'):
if n.endswith('2011') or n.endswith('2012'):
nome_della_puntata = prima_tv_ita
prima_tv_ita = n
if prima_tv_ita.startswith('rowspan'):