- thumbnail = self._og_search_thumbnail(webpage)
- description = self._og_search_description(webpage)
-
- r = [
- self._API_KEY,
- [
- 'preview/flv_link',
- {
- 'uid': video_id,
- },
- ],
- ]
- r_json = json.dumps(r)
- post = compat_urllib_parse.urlencode({'r': r_json})
- req = sanitized_Request(self._API_URL, post)
- req.add_header('Content-type', 'application/x-www-form-urlencoded')
-
- response = self._download_json(req, video_id)
- if response['status'] != 'OK':
- raise ExtractorError(
- '%s returned error: %s' % (self.IE_NAME, response['data']),
- expected=True
- )
- item = response['data'][0]
- video_url = item['link']
- duration = int_or_none(item['length'])
- width = int_or_none(item['width'])
- height = int_or_none(item['height'])
- filesize = int_or_none(item['convert_size'])