fix: fast return if url is None
This commit is contained in:
@@ -84,6 +84,8 @@ class Parser:
|
|||||||
self.detailurl = self.specifiedUrl
|
self.detailurl = self.specifiedUrl
|
||||||
else:
|
else:
|
||||||
self.detailurl = self.queryNumberUrl(number)
|
self.detailurl = self.queryNumberUrl(number)
|
||||||
|
if not self.detailurl:
|
||||||
|
return None
|
||||||
htmltree = self.getHtmlTree(self.detailurl)
|
htmltree = self.getHtmlTree(self.detailurl)
|
||||||
result = self.dictformat(htmltree)
|
result = self.dictformat(htmltree)
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user