aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2009-04-15 20:01:06 +0200
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-10-31 11:24:08 +0100
commit9cee6d903589093e4f5d2b2ced297f4af1d65fef (patch)
tree5c6a83c450e07ff985225af148aa7d95c4288a71
parentc8619e01637ae33ff6ed2a770a6222d792cf0771 (diff)
downloadyoutube-dl-9cee6d903589093e4f5d2b2ced297f4af1d65fef.tar.xz
Minor adjustments to closely match what a web browser does
-rwxr-xr-xyoutube-dl4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl
index c526071e5..0abfaef38 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -578,6 +578,8 @@ class YoutubeIE(InfoExtractor):
if self._downloader is not None:
params = self._downloader.params
format_param = params.get('format', None)
+ if format_param is None:
+ format_param = '34'
# Extension
video_extension = {
@@ -604,7 +606,7 @@ class YoutubeIE(InfoExtractor):
if mobj is None:
self.to_stderr(u'ERROR: unable to extract "t" parameter')
return [None]
- video_real_url = 'http://www.youtube.com/get_video?video_id=%s&t=%s' % (video_id, mobj.group(1))
+ video_real_url = 'http://www.youtube.com/get_video?video_id=%s&t=%s&el=detailpage&ps=' % (video_id, mobj.group(1))
if format_param is not None:
video_real_url = '%s&fmt=%s' % (video_real_url, format_param)
self.report_video_url(video_id, video_real_url)