forked from rDrama/rDrama
sfd
parent
2585349d46
commit
95d8e9fe25
|
@ -5,7 +5,7 @@ from files.classes import BannedDomain
|
||||||
|
|
||||||
def filter_comment_html(html_text):
|
def filter_comment_html(html_text):
|
||||||
|
|
||||||
soup = BeautifulSoup(html_text, 'xml')
|
soup = BeautifulSoup(html_text, 'html.parser')
|
||||||
|
|
||||||
links = soup.find_all("a")
|
links = soup.find_all("a")
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ def filter_comment_html(html_text):
|
||||||
new_domain += "." + parts[j]
|
new_domain += "." + parts[j]
|
||||||
domain_list.add(new_domain)
|
domain_list.add(new_domain)
|
||||||
|
|
||||||
bans = [x for x in g.db.query(BannedDomain).filter(BannedDomain.domain.in_(list(domain_list))).all()]
|
bans = tuple(x for x in g.db.query(BannedDomain).filter(BannedDomain.domain.in_(list(domain_list))).all())
|
||||||
|
|
||||||
if bans: return bans
|
if bans: return bans
|
||||||
else: return []
|
else: return []
|
||||||
|
|
|
@ -670,7 +670,7 @@ def thumbnail_thread(pid):
|
||||||
|
|
||||||
|
|
||||||
if x.headers.get("Content-Type","").startswith("text/html"):
|
if x.headers.get("Content-Type","").startswith("text/html"):
|
||||||
soup=BeautifulSoup(x.content, 'xml')
|
soup=BeautifulSoup(x.content, 'html.parser')
|
||||||
|
|
||||||
thumb_candidate_urls=[]
|
thumb_candidate_urls=[]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue