This commit is contained in:
marco
2020-01-20 22:42:33 +01:00
parent 3830b53416
commit bc57bf8c8b
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ def find_multiple_matches_groups(text, pattern):
def decodeHtmlentities(data):
import HTMLParser
parser = HTMLParser.HTMLParser()
return parser.unescape(data).encode('utf-8')
return parser.unescape(data)
def unescape(text):

View File

@@ -168,7 +168,7 @@ def scrapeLang(scraped, lang, longtitle):
return language, longtitle
def cleantitle(title):
cleantitle = scrapertools.htmlclean(scrapertools.decodeHtmlentities(title).replace('"', "'").replace('×', 'x').replace('', '-')).strip()
cleantitle = scrapertools.htmlclean(scrapertools.decodeHtmlentities(title).replace('"', "'").replace(u'×', 'x').replace('', '-')).strip()
return cleantitle
def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, typeContentDict, typeActionDict, blacklist, search, pag, function, lang):