[extractor/sibnet] Separate from VKIE
Fixes bfd973ece3 (commitcomment-91834251)
This commit is contained in:
parent
935bac1e4d
commit
7991ae57a8
4 changed files with 21 additions and 8 deletions
|
@ -1639,6 +1639,7 @@ from .shared import (
|
||||||
VivoIE,
|
VivoIE,
|
||||||
)
|
)
|
||||||
from .sharevideos import ShareVideosEmbedIE
|
from .sharevideos import ShareVideosEmbedIE
|
||||||
|
from .sibnet import SibnetEmbedIE
|
||||||
from .shemaroome import ShemarooMeIE
|
from .shemaroome import ShemarooMeIE
|
||||||
from .showroomlive import ShowRoomLiveIE
|
from .showroomlive import ShowRoomLiveIE
|
||||||
from .simplecast import (
|
from .simplecast import (
|
||||||
|
|
|
@ -1864,11 +1864,6 @@ class GenericIE(InfoExtractor):
|
||||||
'title': 'I AM BIO Podcast | BIO',
|
'title': 'I AM BIO Podcast | BIO',
|
||||||
},
|
},
|
||||||
'playlist_mincount': 52,
|
'playlist_mincount': 52,
|
||||||
},
|
|
||||||
{
|
|
||||||
# Sibnet embed (https://help.sibnet.ru/?sibnet_video_embed)
|
|
||||||
'url': 'https://phpbb3.x-tk.ru/bbcode-video-sibnet-t24.html',
|
|
||||||
'only_matching': True,
|
|
||||||
}, {
|
}, {
|
||||||
# WimTv embed player
|
# WimTv embed player
|
||||||
'url': 'http://www.msmotor.tv/wearefmi-pt-2-2021/',
|
'url': 'http://www.msmotor.tv/wearefmi-pt-2-2021/',
|
||||||
|
|
17
yt_dlp/extractor/sibnet.py
Normal file
17
yt_dlp/extractor/sibnet.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class SibnetEmbedIE(InfoExtractor):
|
||||||
|
# Ref: https://help.sibnet.ru/?sibnet_video_embed
|
||||||
|
_VALID_URL = False
|
||||||
|
_EMBED_REGEX = [r'<iframe\b[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//video\.sibnet\.ru/shell\.php\?.*?\bvideoid=\d+.*?)\1']
|
||||||
|
_WEBPAGE_TESTS = [{
|
||||||
|
'url': 'https://phpbb3.x-tk.ru/bbcode-video-sibnet-t24.html',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'shell', # FIXME?
|
||||||
|
'ext': 'mp4',
|
||||||
|
'age_limit': 0,
|
||||||
|
'thumbnail': 'https://video.sibnet.ru/upload/cover/video_1887072_0.jpg',
|
||||||
|
'title': 'КВН Москва не сразу строилась - Девушка впервые играет в Mortal Kombat',
|
||||||
|
}
|
||||||
|
}]
|
|
@ -6,6 +6,7 @@ from .common import InfoExtractor
|
||||||
from .dailymotion import DailymotionIE
|
from .dailymotion import DailymotionIE
|
||||||
from .odnoklassniki import OdnoklassnikiIE
|
from .odnoklassniki import OdnoklassnikiIE
|
||||||
from .pladform import PladformIE
|
from .pladform import PladformIE
|
||||||
|
from .sibnet import SibnetEmbedIE
|
||||||
from .vimeo import VimeoIE
|
from .vimeo import VimeoIE
|
||||||
from .youtube import YoutubeIE
|
from .youtube import YoutubeIE
|
||||||
from ..compat import compat_urlparse
|
from ..compat import compat_urlparse
|
||||||
|
@ -101,8 +102,7 @@ class VKIE(VKBaseIE):
|
||||||
(?P<videoid>-?\d+_\d+)(?:.*\blist=(?P<list_id>([\da-f]+)|(ln-[\da-zA-Z]+)))?
|
(?P<videoid>-?\d+_\d+)(?:.*\blist=(?P<list_id>([\da-f]+)|(ln-[\da-zA-Z]+)))?
|
||||||
)
|
)
|
||||||
'''
|
'''
|
||||||
# https://help.sibnet.ru/?sibnet_video_embed
|
|
||||||
_EMBED_REGEX = [r'<iframe\b[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//video\.sibnet\.ru/shell\.php\?.*?\bvideoid=\d+.*?)\1']
|
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'http://vk.com/videos-77521?z=video-77521_162222515%2Fclub77521',
|
'url': 'http://vk.com/videos-77521?z=video-77521_162222515%2Fclub77521',
|
||||||
|
@ -455,7 +455,7 @@ class VKIE(VKBaseIE):
|
||||||
if odnoklassniki_url:
|
if odnoklassniki_url:
|
||||||
return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
|
return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
|
||||||
|
|
||||||
sibnet_url = next(self._extract_embed_urls(url, info_page), None)
|
sibnet_url = next(SibnetEmbedIE._extract_embed_urls(url, info_page), None)
|
||||||
if sibnet_url:
|
if sibnet_url:
|
||||||
return self.url_result(sibnet_url)
|
return self.url_result(sibnet_url)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue