mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-10 07:18:33 +00:00
Correct extractor name: BoomPlay
==>Boomplay
This commit is contained in:
parent
6beca5eb57
commit
bbb121c2af
@ -281,14 +281,14 @@
|
|||||||
from .bokecc import BokeCCIE
|
from .bokecc import BokeCCIE
|
||||||
from .bongacams import BongaCamsIE
|
from .bongacams import BongaCamsIE
|
||||||
from .boomplay import (
|
from .boomplay import (
|
||||||
BoomPlayEpisodeIE,
|
BoomplayEpisodeIE,
|
||||||
BoomPlayGenericPlaylistIE,
|
BoomplayGenericPlaylistIE,
|
||||||
BoomPlayMusicIE,
|
BoomplayMusicIE,
|
||||||
BoomPlayPlaylistIE,
|
BoomplayPlaylistIE,
|
||||||
BoomPlayPodcastIE,
|
BoomplayPodcastIE,
|
||||||
BoomPlaySearchIE,
|
BoomplaySearchIE,
|
||||||
BoomPlaySearchPageIE,
|
BoomplaySearchPageIE,
|
||||||
BoomPlayVideoIE,
|
BoomplayVideoIE,
|
||||||
)
|
)
|
||||||
from .boosty import BoostyIE
|
from .boosty import BoostyIE
|
||||||
from .bostonglobe import BostonGlobeIE
|
from .bostonglobe import BostonGlobeIE
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
from ..utils.traversal import traverse_obj
|
from ..utils.traversal import traverse_obj
|
||||||
|
|
||||||
|
|
||||||
class BoomPlayBaseIE(InfoExtractor):
|
class BoomplayBaseIE(InfoExtractor):
|
||||||
# Calculated from const values, see lhx.AESUtils.encrypt in public.js
|
# Calculated from const values, see lhx.AESUtils.encrypt in public.js
|
||||||
# Note that the real key/iv differs from `lhx.AESUtils.key`/`lhx.AESUtils.iv`
|
# Note that the real key/iv differs from `lhx.AESUtils.key`/`lhx.AESUtils.iv`
|
||||||
_KEY = b'boomplayVr3xopAM'
|
_KEY = b'boomplayVr3xopAM'
|
||||||
@ -184,7 +184,7 @@ def _extract_playlist_entries(self, webpage, media_types, warn=True):
|
|||||||
return entries
|
return entries
|
||||||
|
|
||||||
|
|
||||||
class BoomPlayMusicIE(BoomPlayBaseIE):
|
class BoomplayMusicIE(BoomplayBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/songs/(?P<id>\d+)'
|
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/songs/(?P<id>\d+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'https://www.boomplay.com/songs/165481965',
|
'url': 'https://www.boomplay.com/songs/165481965',
|
||||||
@ -225,7 +225,7 @@ def _real_extract(self, url):
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class BoomPlayVideoIE(BoomPlayBaseIE):
|
class BoomplayVideoIE(BoomplayBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/video/(?P<id>\d+)'
|
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/video/(?P<id>\d+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'https://www.boomplay.com/video/1154892',
|
'url': 'https://www.boomplay.com/video/1154892',
|
||||||
@ -253,7 +253,7 @@ def _real_extract(self, url):
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class BoomPlayEpisodeIE(BoomPlayBaseIE):
|
class BoomplayEpisodeIE(BoomplayBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/episode/(?P<id>\d+)'
|
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/episode/(?P<id>\d+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'https://www.boomplay.com/episode/7132706',
|
'url': 'https://www.boomplay.com/episode/7132706',
|
||||||
@ -283,7 +283,7 @@ def _real_extract(self, url):
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class BoomPlayPodcastIE(BoomPlayBaseIE):
|
class BoomplayPodcastIE(BoomplayBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/podcasts/(?P<id>\d+)'
|
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/podcasts/(?P<id>\d+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'https://www.boomplay.com/podcasts/5372',
|
'url': 'https://www.boomplay.com/podcasts/5372',
|
||||||
@ -316,7 +316,7 @@ def _real_extract(self, url):
|
|||||||
song_list),
|
song_list),
|
||||||
(..., 'id', {
|
(..., 'id', {
|
||||||
lambda x: self.url_result(
|
lambda x: self.url_result(
|
||||||
f'https://www.boomplay.com/episode/{x}', BoomPlayEpisodeIE, x),
|
f'https://www.boomplay.com/episode/{x}', BoomplayEpisodeIE, x),
|
||||||
}))
|
}))
|
||||||
return self.playlist_result(
|
return self.playlist_result(
|
||||||
song_list, _id,
|
song_list, _id,
|
||||||
@ -325,7 +325,7 @@ def _real_extract(self, url):
|
|||||||
**self._extract_page_metadata(webpage, _id))
|
**self._extract_page_metadata(webpage, _id))
|
||||||
|
|
||||||
|
|
||||||
class BoomPlayPlaylistIE(BoomPlayBaseIE):
|
class BoomplayPlaylistIE(BoomplayBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/(?:playlists|artists|albums)/(?P<id>\d+)'
|
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/(?:playlists|artists|albums)/(?P<id>\d+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.boomplay.com/playlists/33792494',
|
'url': 'https://www.boomplay.com/playlists/33792494',
|
||||||
@ -357,7 +357,7 @@ def _real_extract(self, url):
|
|||||||
self._extract_page_metadata(webpage, playlist_id),
|
self._extract_page_metadata(webpage, playlist_id),
|
||||||
traverse_obj(json_ld_metadata, {
|
traverse_obj(json_ld_metadata, {
|
||||||
'entries': ('track', ..., 'url', {
|
'entries': ('track', ..., 'url', {
|
||||||
functools.partial(self.url_result, ie=BoomPlayMusicIE),
|
functools.partial(self.url_result, ie=BoomplayMusicIE),
|
||||||
}),
|
}),
|
||||||
'playlist_title': 'name',
|
'playlist_title': 'name',
|
||||||
'thumbnail': 'image',
|
'thumbnail': 'image',
|
||||||
@ -366,7 +366,7 @@ def _real_extract(self, url):
|
|||||||
})))
|
})))
|
||||||
|
|
||||||
|
|
||||||
class BoomPlayGenericPlaylistIE(BoomPlayBaseIE):
|
class BoomplayGenericPlaylistIE(BoomplayBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/.+'
|
_VALID_URL = r'https?://(?:www\.)?boomplay\.com/.+'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.boomplay.com/new-songs',
|
'url': 'https://www.boomplay.com/new-songs',
|
||||||
@ -390,12 +390,12 @@ class BoomPlayGenericPlaylistIE(BoomPlayBaseIE):
|
|||||||
def suitable(cls, url):
|
def suitable(cls, url):
|
||||||
if super().suitable(url):
|
if super().suitable(url):
|
||||||
return not any(ie.suitable(url) for ie in (
|
return not any(ie.suitable(url) for ie in (
|
||||||
BoomPlayEpisodeIE,
|
BoomplayEpisodeIE,
|
||||||
BoomPlayMusicIE,
|
BoomplayMusicIE,
|
||||||
BoomPlayPlaylistIE,
|
BoomplayPlaylistIE,
|
||||||
BoomPlayPodcastIE,
|
BoomplayPodcastIE,
|
||||||
BoomPlaySearchPageIE,
|
BoomplaySearchPageIE,
|
||||||
BoomPlayVideoIE,
|
BoomplayVideoIE,
|
||||||
))
|
))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ def _real_extract(self, url):
|
|||||||
**self._extract_page_metadata(webpage, _id))
|
**self._extract_page_metadata(webpage, _id))
|
||||||
|
|
||||||
|
|
||||||
class BoomPlaySearchPageIE(BoomPlayBaseIE):
|
class BoomplaySearchPageIE(BoomplayBaseIE):
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.boomplay.com/search/default/%20Rise%20of%20the%20Falletesn%20Heroes%20fatbunny',
|
'url': 'https://www.boomplay.com/search/default/%20Rise%20of%20the%20Falletesn%20Heroes%20fatbunny',
|
||||||
'md5': 'c5fb4f23e6aae98064230ef3c39c2178',
|
'md5': 'c5fb4f23e6aae98064230ef3c39c2178',
|
||||||
@ -457,7 +457,7 @@ def _real_extract(self, url):
|
|||||||
**self._extract_page_metadata(webpage, query))
|
**self._extract_page_metadata(webpage, query))
|
||||||
|
|
||||||
|
|
||||||
class BoomPlaySearchIE(SearchInfoExtractor):
|
class BoomplaySearchIE(SearchInfoExtractor):
|
||||||
_SEARCH_KEY = 'boomplaysearch'
|
_SEARCH_KEY = 'boomplaysearch'
|
||||||
_RETURN_TYPE = 'url'
|
_RETURN_TYPE = 'url'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
@ -468,4 +468,4 @@ class BoomPlaySearchIE(SearchInfoExtractor):
|
|||||||
def _search_results(self, query):
|
def _search_results(self, query):
|
||||||
yield self.url_result(
|
yield self.url_result(
|
||||||
f'https://www.boomplay.com/search/default/{urllib.parse.quote(query)}',
|
f'https://www.boomplay.com/search/default/{urllib.parse.quote(query)}',
|
||||||
BoomPlaySearchPageIE)
|
BoomplaySearchPageIE)
|
||||||
|
Loading…
Reference in New Issue
Block a user