Add export all books

This commit is contained in:
2024-03-10 08:29:42 +08:00
parent 3888030eec
commit 70d8d12e64
3 changed files with 39 additions and 3 deletions

View File

@@ -20,6 +20,10 @@ class NovelCiwei:
for i in cur:
return json.loads(i[0])
def get_all_books(self):
cur = self._db.execute('SELECT book_id, COUNT(*) FROM catalog1 WHERE is_download = 1 GROUP BY book_id;') # noqa: E501
return cur.fetchall()
def get_books(self):
cur = self._db.execute('SELECT * FROM shelf_book_info;')
cur.row_factory = sqlite3.Row