diff options
author | sprhawk <465558+sprhawk@users.noreply.github.com> | 2017-12-26 22:27:26 +0800 |
---|---|---|
committer | sprhawk <465558+sprhawk@users.noreply.github.com> | 2017-12-26 22:27:26 +0800 |
commit | c33de004e13da11f1ae3cad7310b36500cfb9d28 (patch) | |
tree | c742e448af6c126eca4b259c85f83177aec54847 /youtube_dl/extractor/crunchyroll.py | |
parent | 42a1012c7767306626c5358a18ad3e86417bd7b7 (diff) | |
parent | db145ee54a57f5ccc89639de8c589eb111a91b19 (diff) |
Merge branch 'master' of github.com:rg3/youtube-dl into weibo
Diffstat (limited to 'youtube_dl/extractor/crunchyroll.py')
-rw-r--r-- | youtube_dl/extractor/crunchyroll.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/crunchyroll.py b/youtube_dl/extractor/crunchyroll.py index b53f2d705..b92f25447 100644 --- a/youtube_dl/extractor/crunchyroll.py +++ b/youtube_dl/extractor/crunchyroll.py @@ -392,7 +392,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 'Downloading subtitles for ' + sub_name, data={ 'subtitle_script_id': sub_id, }) - if not sub_doc: + if sub_doc is None: continue sid = sub_doc.get('id') iv = xpath_text(sub_doc, 'iv', 'subtitle iv') @@ -479,9 +479,9 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 'video_quality': stream_quality, 'current_page': url, }) - if streamdata: + if streamdata is not None: stream_info = streamdata.find('./{default}preload/stream_info') - if stream_info: + if stream_info is not None: stream_infos.append(stream_info) stream_info = self._call_rpc_api( 'VideoEncode_GetStreamInfo', video_id, @@ -490,7 +490,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 'video_format': stream_format, 'video_encode_quality': stream_quality, }) - if stream_info: + if stream_info is not None: stream_infos.append(stream_info) for stream_info in stream_infos: video_encode_id = xpath_text(stream_info, './video_encode_id') |