mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-22 22:34:01 -07:00
add support for bunkr
This commit is contained in:
parent
8c86fd33dc
commit
795d439db4
2 changed files with 43 additions and 0 deletions
42
youtube_dl/extractor/bunkr.py
Normal file
42
youtube_dl/extractor/bunkr.py
Normal file
|
@ -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<id>[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'<title>((.|\n)+?|)</title>', 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
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue