projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[brightcove] Improve embed detection (closes #25674)
[youtube-dl]
/
youtube_dl
/
extractor
/
youjizz.py
diff --git
a/youtube_dl/extractor/youjizz.py
b/youtube_dl/extractor/youjizz.py
index f33fabe194daceb9ac6ffaf838536e7c9d53cd34..88aabd272c98e944523f3b333174342ba23c9fe1 100644
(file)
--- a/
youtube_dl/extractor/youjizz.py
+++ b/
youtube_dl/extractor/youjizz.py
@@
-3,11
+3,11
@@
from __future__ import unicode_literals
import re
from .common import InfoExtractor
import re
from .common import InfoExtractor
-from ..compat import compat_str
from ..utils import (
determine_ext,
int_or_none,
parse_duration,
from ..utils import (
determine_ext,
int_or_none,
parse_duration,
+ url_or_none,
)
)
@@
-44,14
+44,14
@@
class YouJizzIE(InfoExtractor):
encodings = self._parse_json(
self._search_regex(
encodings = self._parse_json(
self._search_regex(
- r'
e
ncodings\s*=\s*(\[.+?\]);\n', webpage, 'encodings',
+ r'
[Ee]
ncodings\s*=\s*(\[.+?\]);\n', webpage, 'encodings',
default='[]'),
video_id, fatal=False)
for encoding in encodings:
if not isinstance(encoding, dict):
continue
default='[]'),
video_id, fatal=False)
for encoding in encodings:
if not isinstance(encoding, dict):
continue
- format_url =
encoding.get('filename'
)
- if not
isinstance(format_url, compat_str)
:
+ format_url =
url_or_none(encoding.get('filename')
)
+ if not
format_url
:
continue
if determine_ext(format_url) == 'm3u8':
formats.extend(self._extract_m3u8_formats(
continue
if determine_ext(format_url) == 'm3u8':
formats.extend(self._extract_m3u8_formats(