from __future__ import unicode_literals
from .common import InfoExtractor
+from ..utils import remove_start
class Ir90TvIE(InfoExtractor):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
- title = self._html_search_regex(
- r'<title>\n90tv.ir :: (.*?)</title>', webpage, 'title')
+ title = remove_start(self._html_search_regex(
+ r'<title>([^<]+)</title>', webpage, 'title'), '90tv.ir :: ')
video_url = self._search_regex(
r'<source[^>]+src="([^"]+)"', webpage, 'video url')
- thumbnail = self._search_regex(r'poster="([^"]+)"', webpage, 'thumbnail url')
+ thumbnail = self._search_regex(r'poster="([^"]+)"', webpage, 'thumbnail url', fatal=False)
return {
'url': video_url,
'id': video_id,
'title': title,
- 'video_url' : video_url,
- 'thumbnail' : thumbnail,
+ 'video_url': video_url,
+ 'thumbnail': thumbnail,
}