parent
425f79940a
commit
f1a6deb238
@ -1,20 +1,13 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
try:
|
|
||||||
# Python 3
|
|
||||||
from urllib.parse import urlsplit, urlunsplit, urlencode, parse_qsl
|
|
||||||
except ImportError:
|
|
||||||
# Python 2
|
|
||||||
from urlparse import urlsplit, urlunsplit, parse_qsl
|
|
||||||
from urllib import urlencode
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_str
|
from ..compat import compat_str
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_age_limit,
|
parse_age_limit,
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
|
update_url_query,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -102,9 +95,7 @@ class IndavideoEmbedIE(InfoExtractor):
|
|||||||
if height and filesh:
|
if height and filesh:
|
||||||
token = filesh.get(compat_str(height))
|
token = filesh.get(compat_str(height))
|
||||||
if token is not None:
|
if token is not None:
|
||||||
us = urlsplit(video_url)
|
video_url = update_url_query(video_url, {'token': token})
|
||||||
query = urlencode(parse_qsl(us.query) + [('token', token)])
|
|
||||||
video_url = urlunsplit((us.scheme, us.netloc, us.path, query, us.fragment))
|
|
||||||
return {
|
return {
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'height': height,
|
'height': height,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user