mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-21 09:51:25 +02:00
Compare commits
4 Commits
a40e0b37df
...
4ce2f29a50
Author | SHA1 | Date | |
---|---|---|---|
|
4ce2f29a50 | ||
|
177f0d963e | ||
|
8e02a4dcc8 | ||
|
7b8b1cf5eb |
|
@ -34,6 +34,7 @@ from ..utils import (
|
|||
unified_timestamp,
|
||||
unsmuggle_url,
|
||||
update_url_query,
|
||||
urlhandle_detect_ext,
|
||||
url_or_none,
|
||||
urljoin,
|
||||
variadic,
|
||||
|
@ -2459,7 +2460,7 @@ class GenericIE(InfoExtractor):
|
|||
self.report_detected('direct video link')
|
||||
headers = smuggled_data.get('http_headers', {})
|
||||
format_id = str(m.group('format_id'))
|
||||
ext = determine_ext(url)
|
||||
ext = determine_ext(url, default_ext=None) or urlhandle_detect_ext(full_response)
|
||||
subtitles = {}
|
||||
if format_id.endswith('mpegurl') or ext == 'm3u8':
|
||||
formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers)
|
||||
|
@ -2471,6 +2472,7 @@ class GenericIE(InfoExtractor):
|
|||
formats = [{
|
||||
'format_id': format_id,
|
||||
'url': url,
|
||||
'ext': ext,
|
||||
'vcodec': 'none' if m.group('type') == 'audio' else None
|
||||
}]
|
||||
info_dict['direct'] = True
|
||||
|
|
|
@ -245,7 +245,7 @@ class NPOIE(InfoExtractor):
|
|||
'quality': 'npoplus',
|
||||
'tokenId': player_token,
|
||||
'streamType': 'broadcast',
|
||||
})
|
||||
}, data=b'') # endpoint requires POST
|
||||
if not streams:
|
||||
continue
|
||||
stream = streams.get('stream')
|
||||
|
|
|
@ -15,7 +15,7 @@ from ..utils import (
|
|||
|
||||
class QDanceIE(InfoExtractor):
|
||||
_NETRC_MACHINE = 'qdance'
|
||||
_VALID_URL = r'https?://(?:www\.)?q-dance\.com/network/(?:library|live)/(?P<id>\d+)'
|
||||
_VALID_URL = r'https?://(?:www\.)?q-dance\.com/network/(?:library|live)/(?P<id>[\w-]+)'
|
||||
_TESTS = [{
|
||||
'note': 'vod',
|
||||
'url': 'https://www.q-dance.com/network/library/146542138',
|
||||
|
@ -53,6 +53,27 @@ class QDanceIE(InfoExtractor):
|
|||
'channel_id': 'qdancenetwork.video_149170353',
|
||||
},
|
||||
'skip': 'Completed livestream',
|
||||
}, {
|
||||
'note': 'vod with alphanumeric id',
|
||||
'url': 'https://www.q-dance.com/network/library/WhDleSIWSfeT3Q9ObBKBeA',
|
||||
'info_dict': {
|
||||
'id': 'WhDleSIWSfeT3Q9ObBKBeA',
|
||||
'ext': 'mp4',
|
||||
'title': 'Aftershock I Defqon.1 Weekend Festival 2023 I Sunday I BLUE',
|
||||
'display_id': 'naam-i-defqon-1-weekend-festival-2023-i-dag-i-podium',
|
||||
'description': 'Relive Defqon.1 Path of the Warrior with Aftershock at the BLUE 🔥',
|
||||
'series': 'Defqon.1',
|
||||
'series_id': '31840378',
|
||||
'season': 'Defqon.1 Weekend Festival 2023',
|
||||
'season_id': '141735599',
|
||||
'duration': 3507,
|
||||
'availability': 'premium_only',
|
||||
'thumbnail': 'https://images.q-dance.network/1698158361-230625-135716-defqon-1-aftershock.jpg',
|
||||
},
|
||||
'params': {'skip_download': 'm3u8'},
|
||||
}, {
|
||||
'url': 'https://www.q-dance.com/network/library/-uRFKXwmRZGVnve7av9uqA',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
_access_token = None
|
||||
|
|
|
@ -142,7 +142,7 @@ class TwitCastingIE(InfoExtractor):
|
|||
'https://twitcasting.tv/streamserver.php?target=%s&mode=client' % uploader_id, video_id,
|
||||
'Downloading live info', fatal=False)
|
||||
|
||||
is_live = 'data-status="online"' in webpage
|
||||
is_live = any(f'data-{x}' in webpage for x in ['is-onlive="true"', 'live-type="live"', 'status="online"'])
|
||||
if not traverse_obj(stream_server_data, 'llfmp4') and is_live:
|
||||
self.raise_login_required(method='cookies')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user