1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[utils] Add parse_qs

This commit is contained in:
pukkandan
2021-08-23 00:32:00 +05:30
parent 8fc54b1230
commit 4dfbf8696b
36 changed files with 101 additions and 135 deletions

View File

@ -5,10 +5,8 @@ import re
from .turner import TurnerBaseIE
from ..compat import (
compat_parse_qs,
compat_str,
compat_urllib_parse_unquote,
compat_urllib_parse_urlparse,
)
from ..utils import (
int_or_none,
@ -16,6 +14,7 @@ from ..utils import (
OnDemandPagedList,
parse_duration,
parse_iso8601,
parse_qs,
try_get,
update_url_query,
urljoin,
@ -165,7 +164,7 @@ class NBAWatchIE(NBAWatchBaseIE):
def _real_extract(self, url):
display_id = self._match_id(url)
collection_id = compat_parse_qs(compat_urllib_parse_urlparse(url).query).get('collection', [None])[0]
collection_id = parse_qs(url).get('collection', [None])[0]
if collection_id:
if self.get_param('noplaylist'):
self.to_screen('Downloading just video %s because of --no-playlist' % display_id)
@ -359,7 +358,7 @@ class NBAEmbedIE(NBABaseIE):
}]
def _real_extract(self, url):
qs = compat_parse_qs(compat_urllib_parse_urlparse(url).query)
qs = parse_qs(url)
content_id = qs['contentId'][0]
team = qs.get('team', [None])[0]
if not team: