Skip to content

Commit

Permalink
Fix broken YouTube downloading
Browse files Browse the repository at this point in the history
Something has (again) changed on the web server interface of
YouTube, breaking downloads for older versions of gPodder.
  • Loading branch information
thp committed Jul 24, 2010
1 parent 3c52d4d commit 756aac8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gpodder/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def get_real_download_url(url, preferred_fmt_id=18):
r2 = re.compile('.*&t=([^&]+)').search(page)

if r2:
next = 'http://www.youtube.com/get_video?video_id=' + vid + '&t=' + r2.group(1) + '&fmt=%d' % fmt_id
d = {'video_id': vid, 't': r2.group(1), 'fmt': fmt_id}
next = 'http://www.youtube.com/get_video?video_id=%(video_id)s&t=%(t)s&eurl=&el=&ps=&asv=&fmt=%(fmt)s' % d
log('YouTube link resolved: %s => %s', url, next)
return next

Expand Down

0 comments on commit 756aac8

Please sign in to comment.