forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-02-23 08:01:54 +02:00
parent 2585349d46
commit 95d8e9fe25
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from files.classes import BannedDomain
def filter_comment_html(html_text):
soup = BeautifulSoup(html_text, 'xml')
soup = BeautifulSoup(html_text, 'html.parser')
links = soup.find_all("a")
@ -28,7 +28,7 @@ def filter_comment_html(html_text):
new_domain += "." + parts[j]
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
else: return []

View File

@ -670,7 +670,7 @@ def thumbnail_thread(pid):
if x.headers.get("Content-Type","").startswith("text/html"):
soup=BeautifulSoup(x.content, 'xml')
soup=BeautifulSoup(x.content, 'html.parser')
thumb_candidate_urls=[]