diff --git a/youtube_dl/extractor/bunkr.py b/youtube_dl/extractor/bunkr.py new file mode 100644 index 000000000..2b08aba7f --- /dev/null +++ b/youtube_dl/extractor/bunkr.py @@ -0,0 +1,42 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class BunkrIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?((stream.bunkr\.is)|(bunkr\.su))/v/(?P[0-9A-Za-z\-\.]+)' + _TESTS = [{ + 'url': 'https://stream.bunkr.is/v/miera2000-(18)-xXmlmXQU.mp4', # NSFW + 'info_dict': { + 'id': 'miera2000-', + 'ext': 'mp4', + 'title': 'miera2000-(18)-xXmlmXQU.mp4' + } + }, + { + 'url': 'https://bunkr.su/v/1251555_360p-1ehce9V1.mp4', # NSFW + 'info_dict': { + 'id': '1251555', + 'ext': 'mp4', + 'title': '1251555_360p-1ehce9V1.mp4' + } + }] + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + print(webpage) + title = self._html_search_regex(r'((.|\n)+?|)', webpage, 'title').split(" ")[0] + url = self._html_search_regex(r'link.href = (.+?|);', webpage, 'url')[1:-1] + formats = [{ + 'url':url, + 'ext':'mp4' + }] + + return { + 'id': video_id, + 'title': title, + 'formats': formats + } \ No newline at end of file diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 3a87f9e33..c3fbef46c 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -155,6 +155,7 @@ from .brightcove import ( BrightcoveLegacyIE, BrightcoveNewIE, ) +from .bunkr import BunkrIE from .businessinsider import BusinessInsiderIE from .buzzfeed import BuzzFeedIE from .byutv import BYUtvIE