diff --git a/services/youtube.py b/services/youtube.py index 95f8616..a0ea1ed 100644 --- a/services/youtube.py +++ b/services/youtube.py @@ -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']