1
mirror of https://github.com/yt-dlp/yt-dlp synced 2024-11-18 08:56:11 +01:00

[vk] avoid built-in names

This commit is contained in:
Philipp Hagemeister 2014-01-21 17:29:04 +01:00
parent 032b3df5af
commit 608bf69880

View File

@ -33,13 +33,13 @@ class VKIE(InfoExtractor):
if m_yt is not None:
self.to_screen(u'Youtube video detected')
return self.url_result(m_yt.group(1), 'Youtube')
vars_json = self._search_regex(r'var vars = ({.*?});', info_page, u'vars')
vars = json.loads(vars_json)
data_json = self._search_regex(r'var vars = ({.*?});', info_page, u'vars')
data = json.loads(data_json)
return {
'id': compat_str(vars['vid']),
'url': vars['url240'],
'title': unescapeHTML(vars['md_title']),
'thumbnail': vars['jpg'],
'uploader': vars['md_author'],
'id': compat_str(data['vid']),
'url': data['url240'],
'title': unescapeHTML(data['md_title']),
'thumbnail': data['jpg'],
'uploader': data['md_author'],
}