python3 compatibility fix

This commit is contained in:
tamas 2018-09-06 23:31:55 +02:00
parent d72a1263cf
commit 099b65e268

View File

@ -39,7 +39,9 @@ class MediaKlikkIE(InfoExtractor):
info_json = self._html_search_regex(pattern, webpage, 'info_json')
info_meta = self._parse_json(compat_urllib_parse_unquote(info_json),
None)
video_id = str(info_meta['contentId']).decode('utf-8')
video_id = str(info_meta['contentId'])
if type(video_id) == bytes:
video_id = video_id.decode('utf-8')
info_ret = {
'_type': 'video',
'title': info_meta.get('title') or self._og_search_title(webpage),