mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-05 02:52:50 +08:00
add daclips extractor
This commit is contained in:
parent
1aac03797e
commit
2ce4922315
@ -56,6 +56,7 @@ from .criterion import CriterionIE
|
||||
from .crunchyroll import CrunchyrollIE
|
||||
from .cspan import CSpanIE
|
||||
from .d8 import D8IE
|
||||
from .daclips import DaclipsIE
|
||||
from .dailymotion import (
|
||||
DailymotionIE,
|
||||
DailymotionPlaylistIE,
|
||||
|
21
youtube_dl/extractor/daclips.py
Normal file
21
youtube_dl/extractor/daclips.py
Normal file
@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import re
|
||||
|
||||
from gorillavid import GorillaVidIE
|
||||
|
||||
|
||||
class DaclipsIE(GorillaVidIE):
|
||||
_HOST = 'daclips.in'
|
||||
_VALID_URL = GorillaVidIE._VALID_URL_TEMPLATE % {'host': re.escape(_HOST)}
|
||||
|
||||
_TESTS = [{
|
||||
'url': 'http://daclips.in/3rso4kdn6f9m',
|
||||
'info_dict': {
|
||||
'id': '3rso4kdn6f9m',
|
||||
'ext': 'mp4',
|
||||
'title': 'Micro Pig piglets ready on 16th July 2009',
|
||||
'thumbnail': 're:http://.*\.jpg',
|
||||
},
|
||||
}]
|
@ -12,7 +12,9 @@ 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)?'
|
||||
_HOST = 'gorollavid.id'
|
||||
_VALID_URL_TEMPLATE = r'https?://(?:www\.)?%(host)s/(?:embed-)?(?P<id>[0-9a-zA-Z]+)(?:-[0-9]+x[0-9]+\.html)?'
|
||||
_VALID_URL = _VALID_URL_TEMPLATE % {'host': re.escape(_HOST)}
|
||||
|
||||
_TESTS = [{
|
||||
'url': 'http://gorillavid.in/06y9juieqpmi',
|
||||
@ -38,7 +40,7 @@ class GorillaVidIE(InfoExtractor):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
video_id = mobj.group('id')
|
||||
|
||||
url = 'http://gorillavid.in/%s' % video_id
|
||||
url = 'http://%s/%s' % (self._HOST, video_id)
|
||||
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user