|
|
|
@@ -20,9 +20,9 @@ def create_manga(url): |
|
|
|
print("Author : " + str(data["author"])) |
|
|
|
print("Link : " + url) |
|
|
|
print("Last chap : " + str(data["chap"])) |
|
|
|
print("Image : " + str(data["img"]) |
|
|
|
print("Image : " + str(data["img"])) |
|
|
|
|
|
|
|
cursor.execute(""" INSERT INTO manga(id, title, author, url, chap, img) VALUES(:id, :title, :author, :url, :chap, :img)""", data) |
|
|
|
cursor.execute("""INSERT INTO manga(id, title, author, url, chap, img) VALUES(:id, :title, :author, :url, :chap, :img)""", data) |
|
|
|
conn.commit() |
|
|
|
|
|
|
|
def main(): |
|
|
|
@@ -41,7 +41,13 @@ def main(): |
|
|
|
print("Mode utilisateur") |
|
|
|
url = input("Veuillez entrer l'URL du manga : ") |
|
|
|
print("URL : %s" % url) |
|
|
|
create_manga(url) |
|
|
|
try : |
|
|
|
create_manga(url) |
|
|
|
except sqlite3.IntegrityError : |
|
|
|
print("Erreur dans l'ajout ! Deja present(?)") |
|
|
|
except urllib.error.HTTPError : |
|
|
|
print("Erreur HTTP.. deuxieme tentative") |
|
|
|
create_manga(url) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|