aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/voicerepublic.py
diff options
context:
space:
mode:
authorDuncan <duncan@vtllf.org>2015-05-10 16:38:26 +1200
committerDuncan <duncan@vtllf.org>2015-05-10 17:06:34 +1200
commit1dcb52188d3709711b3ea5ae1ff6bdb985e79c62 (patch)
treeb7ea35cd834301192c07d110ed9d2d0a00fc8ffc /youtube_dl/extractor/voicerepublic.py
parent28ebef0b1b1b7b97137fbd8e093c09cb51954606 (diff)
[voicerepublic] Remove hardcoded paths to media files
Diffstat (limited to 'youtube_dl/extractor/voicerepublic.py')
-rw-r--r--youtube_dl/extractor/voicerepublic.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/youtube_dl/extractor/voicerepublic.py b/youtube_dl/extractor/voicerepublic.py
index d150b5b5e..a3e40b940 100644
--- a/youtube_dl/extractor/voicerepublic.py
+++ b/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 {