Replace HTML entities in Youtube results

master
Nikola Forró 6 years ago
parent 1cfecb666e
commit a7fb13e477

@ -1,3 +1,5 @@
import html
import fuzzywuzzy.fuzz
import fuzzywuzzy.process
import googleapiclient
@ -46,10 +48,10 @@ class Youtube(object):
result.append(dict(
kind=kind,
url=url,
title=item['snippet']['title'],
description=item['snippet']['description'],
title=html.unescape(item['snippet']['title']),
description=html.unescape(item['snippet']['description']),
thumbnail_url=get_thumbnail_url(item['snippet']['thumbnails']),
channel_title=channel['snippet']['title'],
channel_title=html.unescape(channel['snippet']['title']),
channel_url='{0}/c/{1}'.format(BASE_URL, channel['snippet']['customUrl']),
channel_thumbnail_url=get_thumbnail_url(channel['snippet']['thumbnails'])))
count -= resp['pageInfo']['resultsPerPage']

Loading…
Cancel
Save