Compare commits

...

6 Commits

Author SHA1 Message Date
dirkf
ed1ad29633
[extractor/bigo] Update API URL 2022-08-28 01:47:16 +01:00
dirkf
9a0a381954
[bigo] Supply missing media extension 2022-08-28 01:40:08 +01:00
dirkf
4f10e1e7c7
[test] Identify download errors better 2022-08-08 14:21:09 +01:00
dirkf
e679476ea0
[aes] Linter 2022-08-08 08:26:44 +01:00
dirkf
28194bd327
[extractor/minds]
Linter
2022-08-08 08:17:22 +01:00
dirkf
efa723edc6
[test] Identify testcase errors better 2022-08-08 08:09:55 +01:00
4 changed files with 9 additions and 5 deletions

View File

@ -33,6 +33,7 @@ from youtube_dl.compat import (
from youtube_dl.utils import (
DownloadError,
ExtractorError,
error_to_compat_str,
format_bytes,
UnavailableVideoError,
)
@ -108,7 +109,7 @@ def generator(test_case, tname):
for tc in test_cases:
info_dict = tc.get('info_dict', {})
if not (info_dict.get('id') and info_dict.get('ext')):
raise Exception('Test definition incorrect. The output file cannot be known. Are both \'id\' and \'ext\' keys present?')
raise Exception('Test definition (%s) requires both \'id\' and \'ext\' keys present to define the output file' % (tname, ))
if 'skip' in test_case:
print_skipping(test_case['skip'])
@ -161,7 +162,9 @@ def generator(test_case, tname):
except (DownloadError, ExtractorError) as err:
# Check if the exception is not a network related one
if not err.exc_info[0] in (compat_urllib_error.URLError, socket.timeout, UnavailableVideoError, compat_http_client.BadStatusLine) or (err.exc_info[0] == compat_HTTPError and err.exc_info[1].code == 503):
raise
msg = getattr(err, 'msg', error_to_compat_str(err))
err.msg = '%s (%s)' % (msg, tname, )
raise err
if try_num == RETRIES:
report_warning('%s failed due to network errors, skipping...' % tname)

View File

@ -12,6 +12,7 @@ class BigoIE(InfoExtractor):
'url': 'https://www.bigo.tv/ja/221338632',
'info_dict': {
'id': '6576287577575737440',
'ext': 'mp4',
'title': '土よ〜💁‍♂️ 休憩室/REST room',
'thumbnail': r're:https?://.+',
'uploader': '✨Shin💫',
@ -31,7 +32,7 @@ class BigoIE(InfoExtractor):
user_id = self._match_id(url)
info_raw = self._download_json(
'https://bigo.tv/studio/getInternalStudioInfo',
'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo',
user_id, data=urlencode_postdata({'siteId': user_id}))
if not isinstance(info_raw, dict):