assume utf8 encoding

This commit is contained in:
2019-09-10 14:02:36 -04:00
parent 06d6762d51
commit 8f8c4f23f0
7 changed files with 21 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ class LolNadaHtmlChanHelper(ChanHelper):
return item["time"]
def parse_threads_list(self, r):
soup = BeautifulSoup(r.text, "html.parser")
soup = BeautifulSoup(r.content.decode('utf-8', 'ignore'), "html.parser")
threads = []
@@ -59,7 +59,7 @@ class LolNadaHtmlChanHelper(ChanHelper):
@staticmethod
def parse_thread(r):
soup = BeautifulSoup(r.text, "html.parser")
soup = BeautifulSoup(r.content.decode('utf-8', 'ignore'), "html.parser")
op_el = soup.find("div", class_="hilo")
for post_el in op_el.find_all("div", class_="post reply"):