Browse Source

[voicerepublic] Remove hardcoded paths to media files

master
Duncan 9 years ago
parent
commit
1dcb52188d
1 changed files with 2 additions and 5 deletions
  1. 7
      youtube_dl/extractor/voicerepublic.py

7
youtube_dl/extractor/voicerepublic.py

@ -34,15 +34,12 @@ class VoiceRepublicIE(InfoExtractor):
if '<a>Queued for processing, please stand by...</a>' in webpage:
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 = [{
'url': 'https://voicerepublic.com/vrmedia/{}-clean.{}'.format(video_id, ext),
'url': 'https://voicerepublic.com' + path,
'ext': ext,
'format_id': ext,
'vcodec': 'none',
} for ext in exts]
} for ext, path in re.findall(r"data-([^=]+)='(/[^']+\.\1)'", webpage)]
self._sort_formats(formats)
return {

Loading…
Cancel
Save