aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-07-11 11:05:16 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-07-11 11:05:16 +0200
commit953b3586687f859d8b9fc7e8d9c155fb360ee587 (patch)
treea596ea71727714154d076c3ab39af43cd1a7b4fa
parent3dfd25b3aa608e175d5f16b6e0cc7fe82b8ad7ac (diff)
downloadyoutube-dl-953b3586687f859d8b9fc7e8d9c155fb360ee587.tar.xz
[gorillavid] Add support for daclips.in (Closes #3213)
-rw-r--r--youtube_dl/extractor/gorillavid.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/youtube_dl/extractor/gorillavid.py b/youtube_dl/extractor/gorillavid.py
index aa15cafc3..50ef54cce 100644
--- a/youtube_dl/extractor/gorillavid.py
+++ b/youtube_dl/extractor/gorillavid.py
@@ -12,7 +12,12 @@ from ..utils import (
class GorillaVidIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?gorillavid\.in/(?:embed-)?(?P<id>[0-9a-zA-Z]+)(?:-[0-9]+x[0-9]+\.html)?'
+ IE_DESC = 'GorillaVid.in and daclips.in'
+ _VALID_URL = r'''(?x)
+ https?://(?:www\.)?
+ (?:daclips\.in|gorillavid\.in)/
+ (?:embed-)?(?P<id>[0-9a-zA-Z]+)(?:-[0-9]+x[0-9]+\.html)?
+ '''
_TESTS = [{
'url': 'http://gorillavid.in/06y9juieqpmi',
@@ -32,14 +37,20 @@ class GorillaVidIE(InfoExtractor):
'title': 'Say something nice',
'thumbnail': 're:http://.*\.jpg',
},
+ }, {
+ 'url': 'http://daclips.in/3rso4kdn6f9m',
+ 'info_dict': {
+ 'id': '3rso4kdn6f9m',
+ 'ext': 'mp4',
+ 'title': 'Micro Pig piglets ready on 16th July 2009',
+ 'thumbnail': 're:http://.*\.jpg',
+ },
}]
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
- url = 'http://gorillavid.in/%s' % video_id
-
webpage = self._download_webpage(url, video_id)
fields = dict(re.findall(r'''(?x)<input\s+