projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
28ebef0
)
[voicerepublic] Remove hardcoded paths to media files
author
Duncan
<duncan@vtllf.org>
Sun, 10 May 2015 04:38:26 +0000
(16:38 +1200)
committer
Duncan
<duncan@vtllf.org>
Sun, 10 May 2015 05:06:34 +0000
(17:06 +1200)
youtube_dl/extractor/voicerepublic.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/voicerepublic.py
b/youtube_dl/extractor/voicerepublic.py
index d150b5b5e275bcc402c3d50aae0603cc28aa81b4..a3e40b940139f3a22cc0e9dc4a20af7578c7fc25 100644
(file)
--- 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')
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 = [{
formats = [{
- 'url': 'https://voicerepublic.com
/vrmedia/{}-clean.{}'.format(video_id, ext)
,
+ 'url': 'https://voicerepublic.com
' + path
,
'ext': ext,
'format_id': ext,
'vcodec': 'none',
'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 {
self._sort_formats(formats)
return {