diff --git a/scrapinglib/parser.py b/scrapinglib/parser.py index 8806036..dbbf8e4 100644 --- a/scrapinglib/parser.py +++ b/scrapinglib/parser.py @@ -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