From dff2109685711b3ca04aa37a00eafaa9c253fa18 Mon Sep 17 00:00:00 2001 From: Mohammad Teimori Pabandi Date: Thu, 26 Mar 2015 17:33:25 +0430 Subject: [PATCH] description bug fix --- youtube_dl/extractor/varzesh3.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/varzesh3.py b/youtube_dl/extractor/varzesh3.py index a0395942c..8bb5b1b0e 100644 --- a/youtube_dl/extractor/varzesh3.py +++ b/youtube_dl/extractor/varzesh3.py @@ -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']+class="matn">[^<]+

([^<]+)<\/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'

(.*?)
', 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,