mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 02:01:25 +01:00
Compare commits
5 Commits
974c55d7c6
...
ada47b67eb
Author | SHA1 | Date | |
---|---|---|---|
|
ada47b67eb | ||
|
b43bc03249 | ||
|
1e9a9561f3 | ||
|
e58284f924 | ||
|
5803f6116a |
|
@ -1888,6 +1888,9 @@ The following extractors use this feature:
|
|||
#### nflplusreplay
|
||||
* `type`: Type(s) of game replays to extract. Valid types are: `full_game`, `full_game_spanish`, `condensed_game` and `all_22`. You can use `all` to extract all available replay types, which is the default
|
||||
|
||||
#### jiosaavn
|
||||
* `bitrate`: Which bitrates to request. Valid options are `16`, `32`, `64`, `128`, and `320` or a comma-separated list of these values. Defaults to `128,320`.
|
||||
|
||||
**Note**: These options may be changed/removed in the future without concern for backward compatibility
|
||||
|
||||
<!-- MANPAGE: MOVE "INSTALLATION" SECTION HERE -->
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
int_or_none,
|
||||
js_to_json,
|
||||
url_or_none,
|
||||
urlencode_postdata,
|
||||
urljoin,
|
||||
int_or_none
|
||||
)
|
||||
from ..utils.traversal import traverse_obj
|
||||
|
||||
|
@ -21,13 +21,16 @@ class JioSaavnSongIE(JioSaavnBaseIE):
|
|||
_VALID_URL = r'https?://(?:www\.)?(?:jiosaavn\.com/song/[^/?#]+/|saavn\.com/s/song/(?:[^/?#]+/){3})(?P<id>[^/?#]+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.jiosaavn.com/song/leja-re/OQsEfQFVUXk',
|
||||
'md5': '7b1f70de088ede3a152ea34aece4df42',
|
||||
'md5': '3b84396d15ed9e083c3106f1fa589c04',
|
||||
'info_dict': {
|
||||
'id': 'OQsEfQFVUXk',
|
||||
'ext': 'mp3',
|
||||
'ext': 'mp4',
|
||||
'title': 'Leja Re',
|
||||
'album': 'Leja Re',
|
||||
'thumbnail': 'https://c.saavncdn.com/258/Leja-Re-Hindi-2018-20181124024539-500x500.jpg',
|
||||
'duration': 205,
|
||||
'view_count': int,
|
||||
'release_year': 2018,
|
||||
},
|
||||
}, {
|
||||
'url': 'https://www.saavn.com/s/song/hindi/Saathiya/O-Humdum-Suniyo-Re/KAMiazoCblU',
|
||||
|
@ -36,11 +39,11 @@ class JioSaavnSongIE(JioSaavnBaseIE):
|
|||
|
||||
def _real_extract(self, url):
|
||||
audio_id = self._match_id(url)
|
||||
formats = []
|
||||
# available bitrates are 16, 32, 64, 128, 320
|
||||
extract_bitrates = self._configuration_arg('bitrate', ['16', '32', '64', '128', '320'], ie_key='JioSaavn')
|
||||
|
||||
extract_bitrates = self._configuration_arg('bitrate', ['128', '320'], ie_key='JioSaavn')
|
||||
if not all(bitrate in ('16', '32', '64', '128', '320') for bitrate in extract_bitrates):
|
||||
raise ValueError(f'Invalid bitrate(s) {extract_bitrates}')
|
||||
|
||||
song_data = self._extract_initial_data(url, audio_id)['song']['song']
|
||||
formats = []
|
||||
for bitrate in extract_bitrates:
|
||||
|
@ -77,7 +80,7 @@ class JioSaavnSongIE(JioSaavnBaseIE):
|
|||
|
||||
|
||||
class JioSaavnAlbumIE(JioSaavnBaseIE):
|
||||
_VALID_URL = r'https?://(?:www\.)?(?:jio)?saavn\.com/(?:s/playlist|album)/[^/?#]+/(?P<id>[^/?#]+)'
|
||||
_VALID_URL = r'https?://(?:www\.)?(?:jio)?saavn\.com/album/[^/?#]+/(?P<id>[^/?#]+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.jiosaavn.com/album/96/buIOjYZDrNA_',
|
||||
'info_dict': {
|
||||
|
|
Loading…
Reference in New Issue
Block a user