|
@@ -55,7 +55,7 @@ class Document_html(BaseModel):
|
|
_dochtmlcon = re.sub("<html>|</html>|<body>|</body>","",_dochtmlcon)
|
|
_dochtmlcon = re.sub("<html>|</html>|<body>|</body>","",_dochtmlcon)
|
|
_soup = BeautifulSoup(_dochtmlcon,"lxml")
|
|
_soup = BeautifulSoup(_dochtmlcon,"lxml")
|
|
for a in _soup.find_all("a"):
|
|
for a in _soup.find_all("a"):
|
|
- if a.attrs["href"].startswith("http://www.bidizhaobiao.com"):
|
|
|
|
|
|
+ if a.attrs.get("href","").startswith("http://www.bidizhaobiao.com"):
|
|
a.decompose()
|
|
a.decompose()
|
|
self.setValue(document_dochtmlcon,re.sub("<html>|</html>|<body>|</body>","",str(_soup)),True)
|
|
self.setValue(document_dochtmlcon,re.sub("<html>|</html>|<body>|</body>","",str(_soup)),True)
|
|
|
|
|