From d8474b5452172bebf1bdd770244927c2ee935c18 Mon Sep 17 00:00:00 2001 From: Yuki Watanabe Date: Mon, 29 Apr 2024 12:40:07 +0900 Subject: [PATCH 1/2] fix: page parse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spanだとWikiSyntaxが効いて正常にパースできない --- src/wikidot/module/page.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wikidot/module/page.py b/src/wikidot/module/page.py index 40a4e2b..550effd 100644 --- a/src/wikidot/module/page.py +++ b/src/wikidot/module/page.py @@ -93,7 +93,7 @@ def __iter__(self) -> Iterator["Page"]: def _parse(site: "Site", html_body: BeautifulSoup): pages = [] - for page_element in html_body.select("span.page"): + for page_element in html_body.select("div.page"): page_params = {} # レーティング方式を判定 @@ -178,7 +178,7 @@ def search_pages(site: "Site", query: SearchPagesQuery = SearchPagesQuery()): query_dict = query.as_dict() query_dict["moduleName"] = "list/ListPagesModule" query_dict["module_body"] = ( - '[[span class="page"]]' + '[[div class="page"]]' + "".join( [ f'[[span class="set {key}"]]' @@ -188,7 +188,7 @@ def search_pages(site: "Site", query: SearchPagesQuery = SearchPagesQuery()): for key in DEFAULT_MODULE_BODY ] ) - + "[[/span]]" + + "[[/div]]" ) try: From 19d43e370aeda7dcf43aa993754c663ab68ac37e Mon Sep 17 00:00:00 2001 From: Yuki Watanabe Date: Mon, 29 Apr 2024 12:40:21 +0900 Subject: [PATCH 2/2] release: 3.0.6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fe3c26b..6f3bfb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "wikidot" -version = "3.0.5" +version = "3.0.6" authors = [{ name = "ukwhatn", email = "ukwhatn@gmail.com" }] description = "Wikidot Utility Library" readme = "README.md"