mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-26 17:46:45 +00:00
[voicerepublic] Raise ExtractorError if audio is still being processed
This commit is contained in:
parent
03f760b1c0
commit
f03a8a3c4e
1 changed files with 12 additions and 15 deletions
|
@ -2,10 +2,8 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from ..compat import compat_urllib_request
|
||||||
from ..compat import (
|
from ..utils import ExtractorError
|
||||||
compat_urllib_request,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class VoiceRepublicIE(InfoExtractor):
|
class VoiceRepublicIE(InfoExtractor):
|
||||||
|
@ -31,17 +29,16 @@ class VoiceRepublicIE(InfoExtractor):
|
||||||
thumbnail = self._og_search_thumbnail(webpage)
|
thumbnail = self._og_search_thumbnail(webpage)
|
||||||
video_id = self._search_regex(r'/(\d+)\.png', thumbnail, 'id')
|
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:
|
||||||
formats = [{
|
raise ExtractorError('Audio is still queued for processing')
|
||||||
'url': 'https://voicerepublic.com/vrmedia/{}-clean.{}'.format(video_id, ext),
|
|
||||||
'ext': ext,
|
formats = [{
|
||||||
'format_id': ext,
|
'url': 'https://voicerepublic.com/vrmedia/{}-clean.{}'.format(video_id, ext),
|
||||||
'vcodec': 'none',
|
'ext': ext,
|
||||||
} for ext in ['m4a', 'mp3', 'ogg']]
|
'format_id': ext,
|
||||||
self._sort_formats(formats)
|
'vcodec': 'none',
|
||||||
else:
|
} for ext in ['m4a', 'mp3', 'ogg']]
|
||||||
# Audio is still queued for processing
|
self._sort_formats(formats)
|
||||||
formats = []
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
|
Loading…
Reference in a new issue