mirror of https://github.com/yt-dlp/yt-dlp.git
[ie/Boosty] use urllib.parse.unquote directly
This commit is contained in:
parent
2fae8c3363
commit
4304bac272
|
@ -1,4 +1,5 @@
|
||||||
import json
|
import json
|
||||||
|
import urllib
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .youtube import YoutubeIE
|
from .youtube import YoutubeIE
|
||||||
|
@ -10,7 +11,6 @@ from ..utils import (
|
||||||
url_or_none,
|
url_or_none,
|
||||||
)
|
)
|
||||||
from ..utils.traversal import traverse_obj
|
from ..utils.traversal import traverse_obj
|
||||||
from ..compat import compat_urllib_parse_unquote
|
|
||||||
|
|
||||||
|
|
||||||
class BoostyIE(InfoExtractor):
|
class BoostyIE(InfoExtractor):
|
||||||
|
@ -170,7 +170,7 @@ class BoostyIE(InfoExtractor):
|
||||||
auth_headers = {}
|
auth_headers = {}
|
||||||
if auth_cookie is not None:
|
if auth_cookie is not None:
|
||||||
try:
|
try:
|
||||||
auth_data = json.loads(compat_urllib_parse_unquote(auth_cookie.value))
|
auth_data = json.loads(urllib.parse.unquote(auth_cookie.value))
|
||||||
auth_headers['Authorization'] = f'Bearer {auth_data["accessToken"]}'
|
auth_headers['Authorization'] = f'Bearer {auth_data["accessToken"]}'
|
||||||
except (json.JSONDecodeError, KeyError):
|
except (json.JSONDecodeError, KeyError):
|
||||||
self.report_warning('Failed to extract token from auth cookie.')
|
self.report_warning('Failed to extract token from auth cookie.')
|
||||||
|
|
Loading…
Reference in New Issue