Skip to content

Commit

Permalink
[ir90tv] Improve title extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Chi Hsuan committed Jul 25, 2015
1 parent eab7faa commit 9700cd9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions youtube_dl/extractor/ir90tv.py
Expand Up @@ -2,6 +2,7 @@
from __future__ import unicode_literals

from .common import InfoExtractor
from ..utils import remove_start


class Ir90TvIE(InfoExtractor):
Expand All @@ -24,8 +25,8 @@ def _real_extract(self, url):
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')
Expand Down

0 comments on commit 9700cd9

Please sign in to comment.