mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-18 03:20:09 +09:00
[infoq] Avoid crash if the page has no mp3Form
* proposed fix for issue #31131, aligns with yt-dlp Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
parent
fd3f3bebd0
commit
a8d5316aaf
@ -1,6 +1,9 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
from ..utils import (
|
||||||
|
ExtractorError,
|
||||||
|
)
|
||||||
|
|
||||||
from ..compat import (
|
from ..compat import (
|
||||||
compat_b64decode,
|
compat_b64decode,
|
||||||
@ -90,7 +93,11 @@ class InfoQIE(BokeCCBaseIE):
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
def _extract_http_audio(self, webpage, video_id):
|
def _extract_http_audio(self, webpage, video_id):
|
||||||
|
try:
|
||||||
fields = self._form_hidden_inputs('mp3Form', webpage)
|
fields = self._form_hidden_inputs('mp3Form', webpage)
|
||||||
|
except ExtractorError:
|
||||||
|
fields = {}
|
||||||
|
|
||||||
http_audio_url = fields.get('filename')
|
http_audio_url = fields.get('filename')
|
||||||
if not http_audio_url:
|
if not http_audio_url:
|
||||||
return []
|
return []
|
||||||
|
Loading…
Reference in New Issue
Block a user