mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 21:33:19 +00:00
[voicerepublic] Remove hardcoded paths to media files
This commit is contained in:
parent
28ebef0b1b
commit
1dcb52188d
|
@ -34,15 +34,12 @@ def _real_extract(self, url):
|
||||||
if '<a>Queued for processing, please stand by...</a>' in webpage:
|
if '<a>Queued for processing, please stand by...</a>' in webpage:
|
||||||
raise ExtractorError('Audio is still queued for processing')
|
raise ExtractorError('Audio is still queued for processing')
|
||||||
|
|
||||||
ext_matches = re.finditer(r'data-\w+=\'/vrmedia/\d+-clean\.(\w+)\'', webpage)
|
|
||||||
exts = [match.group(1) for match in ext_matches]
|
|
||||||
|
|
||||||
formats = [{
|
formats = [{
|
||||||
'url': 'https://voicerepublic.com/vrmedia/{}-clean.{}'.format(video_id, ext),
|
'url': 'https://voicerepublic.com' + path,
|
||||||
'ext': ext,
|
'ext': ext,
|
||||||
'format_id': ext,
|
'format_id': ext,
|
||||||
'vcodec': 'none',
|
'vcodec': 'none',
|
||||||
} for ext in exts]
|
} for ext, path in re.findall(r"data-([^=]+)='(/[^']+\.\1)'", webpage)]
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue