mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-21 09:51:25 +02:00
Compare commits
No commits in common. "4ce2f29a50fcfb9920e6f2ffe42192945a2bad7e" and "a40e0b37dfc8c26916b0e01aa3f29f3bc42250b6" have entirely different histories.
4ce2f29a50
...
a40e0b37df
|
@ -34,7 +34,6 @@ from ..utils import (
|
||||||
unified_timestamp,
|
unified_timestamp,
|
||||||
unsmuggle_url,
|
unsmuggle_url,
|
||||||
update_url_query,
|
update_url_query,
|
||||||
urlhandle_detect_ext,
|
|
||||||
url_or_none,
|
url_or_none,
|
||||||
urljoin,
|
urljoin,
|
||||||
variadic,
|
variadic,
|
||||||
|
@ -2460,7 +2459,7 @@ class GenericIE(InfoExtractor):
|
||||||
self.report_detected('direct video link')
|
self.report_detected('direct video link')
|
||||||
headers = smuggled_data.get('http_headers', {})
|
headers = smuggled_data.get('http_headers', {})
|
||||||
format_id = str(m.group('format_id'))
|
format_id = str(m.group('format_id'))
|
||||||
ext = determine_ext(url, default_ext=None) or urlhandle_detect_ext(full_response)
|
ext = determine_ext(url)
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
if format_id.endswith('mpegurl') or ext == 'm3u8':
|
if format_id.endswith('mpegurl') or ext == 'm3u8':
|
||||||
formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers)
|
formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers)
|
||||||
|
@ -2472,7 +2471,6 @@ class GenericIE(InfoExtractor):
|
||||||
formats = [{
|
formats = [{
|
||||||
'format_id': format_id,
|
'format_id': format_id,
|
||||||
'url': url,
|
'url': url,
|
||||||
'ext': ext,
|
|
||||||
'vcodec': 'none' if m.group('type') == 'audio' else None
|
'vcodec': 'none' if m.group('type') == 'audio' else None
|
||||||
}]
|
}]
|
||||||
info_dict['direct'] = True
|
info_dict['direct'] = True
|
||||||
|
|
|
@ -245,7 +245,7 @@ class NPOIE(InfoExtractor):
|
||||||
'quality': 'npoplus',
|
'quality': 'npoplus',
|
||||||
'tokenId': player_token,
|
'tokenId': player_token,
|
||||||
'streamType': 'broadcast',
|
'streamType': 'broadcast',
|
||||||
}, data=b'') # endpoint requires POST
|
})
|
||||||
if not streams:
|
if not streams:
|
||||||
continue
|
continue
|
||||||
stream = streams.get('stream')
|
stream = streams.get('stream')
|
||||||
|
|
|
@ -15,7 +15,7 @@ from ..utils import (
|
||||||
|
|
||||||
class QDanceIE(InfoExtractor):
|
class QDanceIE(InfoExtractor):
|
||||||
_NETRC_MACHINE = 'qdance'
|
_NETRC_MACHINE = 'qdance'
|
||||||
_VALID_URL = r'https?://(?:www\.)?q-dance\.com/network/(?:library|live)/(?P<id>[\w-]+)'
|
_VALID_URL = r'https?://(?:www\.)?q-dance\.com/network/(?:library|live)/(?P<id>\d+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'note': 'vod',
|
'note': 'vod',
|
||||||
'url': 'https://www.q-dance.com/network/library/146542138',
|
'url': 'https://www.q-dance.com/network/library/146542138',
|
||||||
|
@ -53,27 +53,6 @@ class QDanceIE(InfoExtractor):
|
||||||
'channel_id': 'qdancenetwork.video_149170353',
|
'channel_id': 'qdancenetwork.video_149170353',
|
||||||
},
|
},
|
||||||
'skip': 'Completed livestream',
|
'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
|
_access_token = None
|
||||||
|
|
|
@ -142,7 +142,7 @@ class TwitCastingIE(InfoExtractor):
|
||||||
'https://twitcasting.tv/streamserver.php?target=%s&mode=client' % uploader_id, video_id,
|
'https://twitcasting.tv/streamserver.php?target=%s&mode=client' % uploader_id, video_id,
|
||||||
'Downloading live info', fatal=False)
|
'Downloading live info', fatal=False)
|
||||||
|
|
||||||
is_live = any(f'data-{x}' in webpage for x in ['is-onlive="true"', 'live-type="live"', 'status="online"'])
|
is_live = 'data-status="online"' in webpage
|
||||||
if not traverse_obj(stream_server_data, 'llfmp4') and is_live:
|
if not traverse_obj(stream_server_data, 'llfmp4') and is_live:
|
||||||
self.raise_login_required(method='cookies')
|
self.raise_login_required(method='cookies')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user