Merge pull request #910 from Bluefissure/patch-2
fix: fast return if url is None
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user