Merge pull request #910 from Bluefissure/patch-2

fix: fast return if url is None
This commit is contained in:
Yoshiko2
2022-11-02 01:51:24 +08:00
committed by GitHub

View File

@@ -84,6 +84,8 @@ class Parser:
self.detailurl = self.specifiedUrl
else:
self.detailurl = self.queryNumberUrl(number)
if not self.detailurl:
return None
htmltree = self.getHtmlTree(self.detailurl)
result = self.dictformat(htmltree)
return result