projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7dde5f6
)
[xtube] Use compat_urllib_parse_unquote
author
Sergey M․
<dstftw@gmail.com>
Fri, 17 Jul 2015 17:50:02 +0000
(23:50 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 17 Jul 2015 17:50:02 +0000
(23:50 +0600)
youtube_dl/extractor/xtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/xtube.py
b/youtube_dl/extractor/xtube.py
index 1644f53c876329f053406be3d3dc1aa463cddc1b..779e4f46a1dd5315c6a9be3dad09e65c07a205b2 100644
(file)
--- a/
youtube_dl/extractor/xtube.py
+++ b/
youtube_dl/extractor/xtube.py
@@
-5,7
+5,7
@@
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_request,
from .common import InfoExtractor
from ..compat import (
compat_urllib_request,
- compat_urllib_parse,
+ compat_urllib_parse
_unquote
,
)
from ..utils import (
parse_duration,
)
from ..utils import (
parse_duration,
@@
-59,7
+59,7
@@
class XTubeIE(InfoExtractor):
for format_id, video_url in re.findall(
r'flashvars\.quality_(.+?)\s*=\s*"([^"]+)"', webpage):
fmt = {
for format_id, video_url in re.findall(
r'flashvars\.quality_(.+?)\s*=\s*"([^"]+)"', webpage):
fmt = {
- 'url': compat_urllib_parse
.
unquote(video_url),
+ 'url': compat_urllib_parse
_
unquote(video_url),
'format_id': format_id,
}
m = re.search(r'^(?P<height>\d+)[pP]', format_id)
'format_id': format_id,
}
m = re.search(r'^(?P<height>\d+)[pP]', format_id)
@@
-68,7
+68,7
@@
class XTubeIE(InfoExtractor):
formats.append(fmt)
if not formats:
formats.append(fmt)
if not formats:
- video_url = compat_urllib_parse
.
unquote(self._search_regex(
+ video_url = compat_urllib_parse
_
unquote(self._search_regex(
r'flashvars\.video_url\s*=\s*"([^"]+)"',
webpage, 'video URL'))
formats.append({'url': video_url})
r'flashvars\.video_url\s*=\s*"([^"]+)"',
webpage, 'video URL'))
formats.append({'url': video_url})