import os import sqlite3 vvvvidb = "vvvvidb.sqlite3" if not os.path.isfile(vvvvidb): print("{} file not found. Scrape the DB first using vvvvget.py".format(vvvvidb)) exit(1) con = sqlite3.connect(vvvvidb) cur = con.cursor() out = open('index.html', 'w') out.write(''' Anime | lsd.cat Source Database

''') # Select all the series # cur.execute("SELECT * FROM series;") # Selecy only series with at least one episodes cur.execute("SELECT s.* FROM series as s INNER JOIN episodes as e ON e.serie_id = s.id AND e.season_id = s.season_id GROUP BY s.id, s.season_id;") series = cur.fetchall() for s in series: serie = (str(s[0]), str(s[2])) out.write("\t

{}: {} - Id Serie: {} - Tipo: {}

\n\t\n') out.write('\n\n') out.close() con.commit() con.close()