From 9d49cf7de0ad82f88634c9bac225b51cac83bc07 Mon Sep 17 00:00:00 2001 From: hillerliao Date: Fri, 9 Feb 2024 11:21:04 +0900 Subject: [PATCH] add 0 to tadoku level with th the meaning of all levels --- rsshub/spiders/tadoku/books.py | 1 + rsshub/templates/main/feeds.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rsshub/spiders/tadoku/books.py b/rsshub/spiders/tadoku/books.py index bee2860..64b55f2 100644 --- a/rsshub/spiders/tadoku/books.py +++ b/rsshub/spiders/tadoku/books.py @@ -12,6 +12,7 @@ def parse(post): return item def ctx(category=''): + category = category if category != '0' else '' url = f"{domain}/japanese/book-search?level={category}" tree = fetch(url,headers=DEFAULT_HEADERS) posts = tree.css('.col-6.col-sm-4.col-md-3.col-lg-2.bl-wrap-small') diff --git a/rsshub/templates/main/feeds.html b/rsshub/templates/main/feeds.html index f37e2b0..a4e372a 100644 --- a/rsshub/templates/main/feeds.html +++ b/rsshub/templates/main/feeds.html @@ -243,7 +243,7 @@
图书 by hillerliao

举例:https://pyrsshub.vercel.app/tadoku/books/l0

路由:/tadoku/books/:category

-

参数:category [必填,难度等级,l0、l1、l2、l3、l4、l5 ]

+

参数:category [必填,难度等级,l0、l1、l2、l3、l4、l5、0。0为不指定 ]