mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-15 02:47:34 +08:00
Added support for Geeks and Sundry
This commit is contained in:
parent
78e2b74bb9
commit
232e3556b8
@ -188,6 +188,7 @@ from .gamestar import GameStarIE
|
|||||||
from .gametrailers import GametrailersIE
|
from .gametrailers import GametrailersIE
|
||||||
from .gazeta import GazetaIE
|
from .gazeta import GazetaIE
|
||||||
from .gdcvault import GDCVaultIE
|
from .gdcvault import GDCVaultIE
|
||||||
|
from .geeksandsundry import GeeksAndSundryIE
|
||||||
from .generic import GenericIE
|
from .generic import GenericIE
|
||||||
from .gfycat import GfycatIE
|
from .gfycat import GfycatIE
|
||||||
from .giantbomb import GiantBombIE
|
from .giantbomb import GiantBombIE
|
||||||
|
37
youtube_dl/extractor/geeksandsundry.py
Normal file
37
youtube_dl/extractor/geeksandsundry.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
class GeeksAndSundryIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https://(?:\w+\.)geekandsundry.com/(?P<title>.+)'
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
mobj = re.match(self._VALID_URL, url)
|
||||||
|
page = mobj.group('title')
|
||||||
|
webpage_url = "https://geekandsundry.com/" + page
|
||||||
|
webpage = self._download_webpage(webpage_url, page)
|
||||||
|
|
||||||
|
self.report_extraction(page)
|
||||||
|
|
||||||
|
video_id = self._html_search_regex(r'data-video-id=\"(\d+)\"', webpage, u'video id')
|
||||||
|
pub_id = self._html_search_regex(r'data-account=\"(\d+)\"', webpage, u'pub id')
|
||||||
|
|
||||||
|
video_url = "http://c.brightcove.com/services/mobile/streaming/index/master.m3u8?videoId=%s&pubId=%s" % (video_id, pub_id)
|
||||||
|
|
||||||
|
return [{
|
||||||
|
'id': page,
|
||||||
|
'url': video_url,
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': self._og_search_title(webpage),
|
||||||
|
}]
|
||||||
|
|
||||||
|
_TEST = {
|
||||||
|
u'url': u'https://geekandsundry.com/titansgrave-chapter-0/',
|
||||||
|
u'md5': u'd3507646e87ffb717b8a328b3bb824a8',
|
||||||
|
u'info_dict': {
|
||||||
|
u"id": u"titansgrave-chapter-0/",
|
||||||
|
u"ext": u"mp4",
|
||||||
|
u"title": u"Titansgrave - Chapter 0 _ Geek and Sundry-titansgrave-chapter-0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user