aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/infoq.py
diff options
context:
space:
mode:
authorgudata <gudata@users.noreply.github.com>2022-08-19 23:00:21 +0300
committerGitHub <noreply@github.com>2022-08-19 21:00:21 +0100
commita8d5316aaf3dc740aad486b8c394b2f3e70f5a58 (patch)
tree23caf72db0d2fa40bc325c0f49579854332e3c0a /youtube_dl/extractor/infoq.py
parentfd3f3bebd0699f4b782a24a503093c965c4f4f5e (diff)
downloadyoutube-dl-a8d5316aaf3dc740aad486b8c394b2f3e70f5a58.tar.xz
[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>
Diffstat (limited to 'youtube_dl/extractor/infoq.py')
-rw-r--r--youtube_dl/extractor/infoq.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/extractor/infoq.py b/youtube_dl/extractor/infoq.py
index 0a70a1fb4..60b02b699 100644
--- a/youtube_dl/extractor/infoq.py
+++ b/youtube_dl/extractor/infoq.py
@@ -1,6 +1,9 @@
# coding: utf-8
from __future__ import unicode_literals
+from ..utils import (
+ ExtractorError,
+)
from ..compat import (
compat_b64decode,
@@ -90,7 +93,11 @@ class InfoQIE(BokeCCBaseIE):
}]
def _extract_http_audio(self, webpage, video_id):
- fields = self._form_hidden_inputs('mp3Form', webpage)
+ try:
+ fields = self._form_hidden_inputs('mp3Form', webpage)
+ except ExtractorError:
+ fields = {}
+
http_audio_url = fields.get('filename')
if not http_audio_url:
return []