mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-21 19:15:37 +08:00
[extractor/generic] Unescape video_id and title extracted from URL
This commit is contained in:
parent
931bc3c3a7
commit
339516072b
@ -894,7 +894,7 @@ class GenericIE(InfoExtractor):
|
|||||||
force_videoid = smuggled_data['force_videoid']
|
force_videoid = smuggled_data['force_videoid']
|
||||||
video_id = force_videoid
|
video_id = force_videoid
|
||||||
else:
|
else:
|
||||||
video_id = os.path.splitext(url.rstrip('/').split('/')[-1])[0]
|
video_id = os.path.splitext(compat_urllib_parse.unquote(url.rstrip('/').split('/')[-1]))[0]
|
||||||
|
|
||||||
self.to_screen('%s: Requesting header' % video_id)
|
self.to_screen('%s: Requesting header' % video_id)
|
||||||
|
|
||||||
@ -927,7 +927,7 @@ class GenericIE(InfoExtractor):
|
|||||||
head_response.headers.get('Last-Modified'))
|
head_response.headers.get('Last-Modified'))
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': os.path.splitext(url_basename(url))[0],
|
'title': os.path.splitext(compat_urllib_parse.unquote(url_basename(url)))[0],
|
||||||
'direct': True,
|
'direct': True,
|
||||||
'formats': [{
|
'formats': [{
|
||||||
'format_id': m.group('format_id'),
|
'format_id': m.group('format_id'),
|
||||||
@ -953,7 +953,7 @@ class GenericIE(InfoExtractor):
|
|||||||
head_response.headers.get('Last-Modified'))
|
head_response.headers.get('Last-Modified'))
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': os.path.splitext(url_basename(url))[0],
|
'title': os.path.splitext(compat_urllib_parse.unquote(url_basename(url)))[0],
|
||||||
'direct': True,
|
'direct': True,
|
||||||
'url': url,
|
'url': url,
|
||||||
'upload_date': upload_date,
|
'upload_date': upload_date,
|
||||||
|
Loading…
Reference in New Issue
Block a user