projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8343a03
)
[douyutv] Simplify usage of isinstance
author
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 29 Mar 2015 10:17:48 +0000
(18:17 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 29 Mar 2015 10:17:48 +0000
(18:17 +0800)
youtube_dl/extractor/douyutv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/douyutv.py
b/youtube_dl/extractor/douyutv.py
index 3a1665ab4ba24eff9e95d8a424379e32c54f1a97..479430c51072ab91e976df4d459af372c5608cdd 100644
(file)
--- a/
youtube_dl/extractor/douyutv.py
+++ b/
youtube_dl/extractor/douyutv.py
@@
-67,7
+67,7
@@
class DouyuTVIE(InfoExtractor):
error_code = config.get('error', 0)
if error_code is not 0:
error_desc = 'Server reported error %i' % error_code
- if isinstance(data,
compat_str) or isinstance(data, compat_basestring
):
+ if isinstance(data,
(compat_str, compat_basestring)
):
error_desc += ': ' + data
raise ExtractorError(error_desc, expected=True)