mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 00:54:31 +01:00
[voicerepublic] Raise ExtractorError if audio is still being processed
This commit is contained in:
parent
03f760b1c0
commit
f03a8a3c4e
@ -2,10 +2,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
from ..compat import (
|
||||
compat_urllib_request,
|
||||
)
|
||||
from ..compat import compat_urllib_request
|
||||
from ..utils import ExtractorError
|
||||
|
||||
|
||||
class VoiceRepublicIE(InfoExtractor):
|
||||
@ -31,7 +29,9 @@ class VoiceRepublicIE(InfoExtractor):
|
||||
thumbnail = self._og_search_thumbnail(webpage)
|
||||
video_id = self._search_regex(r'/(\d+)\.png', thumbnail, 'id')
|
||||
|
||||
if '<div class=\'vr-player jp-jplayer\'' in webpage:
|
||||
if '<a>Queued for processing, please stand by...</a>' in webpage:
|
||||
raise ExtractorError('Audio is still queued for processing')
|
||||
|
||||
formats = [{
|
||||
'url': 'https://voicerepublic.com/vrmedia/{}-clean.{}'.format(video_id, ext),
|
||||
'ext': ext,
|
||||
@ -39,9 +39,6 @@ class VoiceRepublicIE(InfoExtractor):
|
||||
'vcodec': 'none',
|
||||
} for ext in ['m4a', 'mp3', 'ogg']]
|
||||
self._sort_formats(formats)
|
||||
else:
|
||||
# Audio is still queued for processing
|
||||
formats = []
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
|
Loading…
Reference in New Issue
Block a user