From 2152dd99e476ae6ccf906b802a18756bdb2640aa Mon Sep 17 00:00:00 2001 From: biaji <2725285+biaji@users.noreply.github.com> Date: Sat, 22 Apr 2023 19:56:01 +0800 Subject: [PATCH] Should return 404 for api to handle None can't be handled correctly by api.py --- scrapinglib/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapinglib/parser.py b/scrapinglib/parser.py index d3727d0..8c8b7fa 100644 --- a/scrapinglib/parser.py +++ b/scrapinglib/parser.py @@ -85,7 +85,7 @@ class Parser: else: self.detailurl = self.queryNumberUrl(number) if not self.detailurl: - return None + return 404 htmltree = self.getHtmlTree(self.detailurl) result = self.dictformat(htmltree) return result