projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2d06ae
)
[twitch] Improve login error extraction
author
Sergey M․
<dstftw@gmail.com>
Sat, 9 Jan 2021 23:23:58 +0000
(06:23 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 9 Jan 2021 23:23:58 +0000
(06:23 +0700)
youtube_dl/extractor/twitch.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitch.py
b/youtube_dl/extractor/twitch.py
index fa19e9a7a27b591aabb37dc08f8cf6063e7a671c..c4fd2f6860bd0c079379ac45d906e5061cc83fad 100644
(file)
--- a/
youtube_dl/extractor/twitch.py
+++ b/
youtube_dl/extractor/twitch.py
@@
-17,6
+17,7
@@
from ..compat import (
)
from ..utils import (
clean_html,
+ dict_get,
ExtractorError,
float_or_none,
int_or_none,
@@
-83,7
+84,7
@@
class TwitchBaseIE(InfoExtractor):
response = self._download_json(
post_url, None, note, data=json.dumps(form).encode(),
headers=headers, expected_status=400)
- error =
response.get('error_description') or response.get('error_code'
)
+ error =
dict_get(response, ('error', 'error_description', 'error_code')
)
if error:
fail(error)