-# coding: utf-8
-from __future__ import unicode_literals
-
-import re
-
from .common import InfoExtractor
from ..utils import js_to_json
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url, flags=re.VERBOSE)
+ mobj = self._match_valid_url(url)
text_id = mobj.group('textid')
webpage = self._download_webpage(url, text_id)
return self.url_result(sohu_video_info['url'], 'Sohu')
page = self._download_json(
- 'http://vxml.56.com/json/%s/' % text_id, text_id, 'Downloading video info')
+ f'http://vxml.56.com/json/{text_id}/', text_id, 'Downloading video info')
info = page['info']
{
'format_id': f['type'],
'filesize': int(f['filesize']),
- 'url': f['url']
+ 'url': f['url'],
} for f in info['rfiles']
]
- self._sort_formats(formats)
return {
'id': info['vid'],