projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[refactor] Do not specify redundant None as second argument in dict.get()
[youtube-dl]
/
youtube_dl
/
extractor
/
crunchyroll.py
diff --git
a/youtube_dl/extractor/crunchyroll.py
b/youtube_dl/extractor/crunchyroll.py
index 00d943f7747d6252edaae9ba8f9c2dc6efedc015..785594df87f692407276d559fad253df37ab6817 100644
(file)
--- a/
youtube_dl/extractor/crunchyroll.py
+++ b/
youtube_dl/extractor/crunchyroll.py
@@
-329,8
+329,10
@@
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
streamdata_req, video_id,
note='Downloading media info for %s' % video_format)
stream_info = streamdata.find('./{default}preload/stream_info')
streamdata_req, video_id,
note='Downloading media info for %s' % video_format)
stream_info = streamdata.find('./{default}preload/stream_info')
- video_url = stream_info.find('./host').text
- video_play_path = stream_info.find('./file').text
+ video_url = xpath_text(stream_info, './host')
+ video_play_path = xpath_text(stream_info, './file')
+ if not video_url or not video_play_path:
+ continue
metadata = stream_info.find('./metadata')
format_info = {
'format': video_format,
metadata = stream_info.find('./metadata')
format_info = {
'format': video_format,