0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-17 01:25:11 +00:00

[dropbox] Fix the video url query (fixes #3868)

Previously it would convert urls without a query into 'something.mp4&dl=1'
This commit is contained in:
Jaime Marquínez Ferrándiz 2014-10-01 23:09:25 +02:00
parent 9e77c60c9a
commit 18937a50a4

View file

@ -29,9 +29,8 @@ def _real_extract(self, url):
video_id = mobj.group('id') video_id = mobj.group('id')
fn = compat_urllib_parse_unquote(url_basename(url)) fn = compat_urllib_parse_unquote(url_basename(url))
title = os.path.splitext(fn)[0] title = os.path.splitext(fn)[0]
video_url = ( video_url = re.sub(r'[?&]dl=0', '', url)
re.sub(r'[?&]dl=0', '', url) + video_url += ('?' if '?' not in video_url else '&') + 'dl=1'
('?' if '?' in url else '&') + 'dl=1')
return { return {
'id': video_id, 'id': video_id,