aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/iconosquare.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-10-28 09:12:28 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-10-28 09:12:28 +0100
commit27c542c06f816100a64a2e3dbc5396df033aa025 (patch)
treebff84c4c9107fbb1e23894aa3cda8665c542a80f /youtube_dl/extractor/iconosquare.py
parentb2e6a1c14c142eab299266641a72101f7d679443 (diff)
[iconosquare] Simplify
Diffstat (limited to 'youtube_dl/extractor/iconosquare.py')
-rw-r--r--youtube_dl/extractor/iconosquare.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/youtube_dl/extractor/iconosquare.py b/youtube_dl/extractor/iconosquare.py
index 1d5a10a3b..370e86e5a 100644
--- a/youtube_dl/extractor/iconosquare.py
+++ b/youtube_dl/extractor/iconosquare.py
@@ -1,7 +1,5 @@
from __future__ import unicode_literals
-import re
-
from .common import InfoExtractor
@@ -20,13 +18,11 @@ class IconosquareIE(InfoExtractor):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
- html_title = self._html_search_regex(
- r'<title>(.+?)</title>',
+ title = self._html_search_regex(
+ r'<title>(.+?)(?: *\(Videos?\))? \| (?:Iconosquare|Statigram)</title>',
webpage, 'title')
- title = re.sub(r'(?: *\(Videos?\))? \| (?:Iconosquare|Statigram)$', '', html_title)
uploader_id = self._html_search_regex(
r'@([^ ]+)', title, 'uploader name', fatal=False)