|
|
|
@@ -16,21 +16,23 @@ def create_manga(url): |
|
|
|
"title" : get_title(url), |
|
|
|
"author" : get_author(url), |
|
|
|
"url" : url, |
|
|
|
"chap" : get_last_chap(url)} |
|
|
|
"chap" : get_last_chap(url), |
|
|
|
"img" : get_img(url)} |
|
|
|
|
|
|
|
print("Id : " + str(data["id"])) |
|
|
|
print("Title : " + str(data["title"])) |
|
|
|
print("Author : " + str(data["author"])) |
|
|
|
print("Link : " + url) |
|
|
|
print("Id : " + str(data["id"])) |
|
|
|
print("Title : " + str(data["title"])) |
|
|
|
print("Author : " + str(data["author"])) |
|
|
|
print("Link : " + url) |
|
|
|
print("Last chap : " + str(data["chap"])) |
|
|
|
cursor.execute(""" INSERT INTO manga(id, title, author, url, chap) VALUES(:id, :title, :author, :url, :chap)""", data) |
|
|
|
print("Image : " + str(get_img(url))) |
|
|
|
|
|
|
|
cursor.execute(""" INSERT INTO manga(id, title, author, url, chap, img) VALUES(:id, :title, :author, :url, :chap, :img)""", data) |
|
|
|
conn.commit() |
|
|
|
|
|
|
|
def main(): |
|
|
|
if len(sys.argv) == 2 : |
|
|
|
print("Mode Script") |
|
|
|
url = sys.argv[1] |
|
|
|
print("URL : %s" % url) |
|
|
|
try : |
|
|
|
create_manga(url) |
|
|
|
except sqlite3.IntegrityError : |
|
|
|
|