1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 14:47:16 +08:00

description bug fix

This commit is contained in:
Mohammad Teimori Pabandi 2015-03-26 17:33:25 +04:30
parent 00e295aeb9
commit dff2109685

View File

@ -43,13 +43,16 @@ class Varzesh3IE(InfoExtractor):
title = self._html_search_regex(r'meta[^>]+property="og:title"[^>]+content="([^"]+)"', webpage, 'title')
video_link = self._html_search_regex(r'source[^>]+src="([^"]+)"', webpage, 'video_link')
id = self._html_search_regex(r"link[^>]+rel='canonical'[^>]+href='\/\?p=([^']+)'\/>", webpage, 'id')
description = self._html_search_regex(r'<div[^>]+class="matn">[^<]+<p>([^<]+)<\/p>', webpage, 'description')
vid_id = self._html_search_regex(r"link[^>]+rel='canonical'[^>]+href='\/\?p=([^']+)'\/>", webpage, 'vid_id')
try:
description = self._html_search_regex(r'<div class="matn">(.*?)</div>', webpage, 'description')
except:
description = title
thumbnail = self._html_search_regex(r'link[^>]+rel="image_src"[^>]+href="([^"]+)"', webpage, 'thumbnail')
return {
'url': video_link,
'id': id,
'id': vid_id,
'title': title,
'ext': video_link.split(".")[-1],
'description': description,