Repos / pytaku / dd995dd642
commit dd995dd6428f6b9edb7c71c8de7b88353604d230
Author: Bùi Thành Nhân <hi@imnhan.com>
Date: Mon Oct 12 16:41:25 2020 +0700
update mangasee cover image server
Also apparently latest `black` takes trailing slash in function argument
list into account, so in order to keep things in 1 line we'll need to
remove the trailing slash.
diff --git a/pyproject.toml b/pyproject.toml
index 11c9416..763ce36 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytaku"
-version = "0.3.24"
+version = "0.3.25"
description = "Self-hostable web-based manga reader"
authors = ["Bùi Thành Nhân <hi@imnhan.com>"]
license = "AGPL-3.0-only"
diff --git a/src/mangoapi/mangasee.py b/src/mangoapi/mangasee.py
index 3b07bf9..03d852d 100644
--- a/src/mangoapi/mangasee.py
+++ b/src/mangoapi/mangasee.py
@@ -117,7 +117,7 @@ def search_title(self, query):
"id": row[0],
"name": row[1],
"site": "mangasee",
- "thumbnail": f"https://cover.mangabeast01.com/cover/{row[0]}.jpg",
+ "thumbnail": f"https://cover.nep.li/cover/{row[0]}.jpg",
}
for row in self.search_table.search(query)
]
@@ -126,7 +126,7 @@ def title_cover(self, title_id, cover_ext):
return self.title_thumbnail(title_id)
def title_thumbnail(self, title_id):
- return f"https://cover.mangabeast01.com/cover/{title_id}.jpg"
+ return f"https://cover.nep.li/cover/{title_id}.jpg"
def title_source_url(self, title_id):
return f"https://mangasee123.com/manga/{title_id}"
@@ -148,13 +148,13 @@ def __init__(self, titles: list):
rows.append((id, name, " ".join(alt_names)))
cursor.executemany(
- "INSERT INTO titles(id, name, alt_names) VALUES(?,?,?);", rows,
+ "INSERT INTO titles(id, name, alt_names) VALUES(?,?,?);", rows
)
def search(self, query):
query = '"' + query.replace('"', '""') + '"'
return self.db.cursor().execute(
- "SELECT id, name FROM titles WHERE titles MATCH ? ORDER BY rank;", (query,),
+ "SELECT id, name FROM titles WHERE titles MATCH ? ORDER BY rank;", (query,)
)
diff --git a/src/pytaku/persistence.py b/src/pytaku/persistence.py
index 5729d9e..4152a89 100644
--- a/src/pytaku/persistence.py
+++ b/src/pytaku/persistence.py
@@ -371,7 +371,7 @@ def get_username(user_id):
def delete_token(token):
num_deleted = run_sql(
- "DELETE FROM token WHERE token=?;", (token,), return_num_affected=True,
+ "DELETE FROM token WHERE token=?;", (token,), return_num_affected=True
)
return num_deleted
diff --git a/tests/mangoapi/test_mangasee.py b/tests/mangoapi/test_mangasee.py
index b66d306..e4cb3b9 100644
--- a/tests/mangoapi/test_mangasee.py
+++ b/tests/mangoapi/test_mangasee.py
@@ -60,6 +60,6 @@ def set(self, key, val):
"id": "Sayonara-Football",
"name": "Sayonara Football",
"site": "mangasee",
- "thumbnail": "https://cover.mangabeast01.com/cover/Sayonara-Football.jpg",
+ "thumbnail": "https://cover.nep.li/cover/Sayonara-Football.jpg",
}
]