I am trying to download TED Talks with subtitles in Gpodder without success.

I use Ubuntu 14.04 and gpodder 3.5.2. I made test subscriptions in TED HD talks (http://feeds.feedburner.com/TedtalksHD/) and regular talks (http://feeds.feedburner.com/tedtalks_video). It works well for video, but without downloading subtitles.

In tools-Preferences-Extensions, TED Talks subtitles downloader is active.

How can I make it work?


Looks like TED Talks subtitles downloader is currently broken, here what I get in terminal:

1399579128.331572 [gpodder.download] INFO: Download was redirected (http://video.ted.com/talk/podcast/2014/None/TEDMusical_2014-480p.mp4). New filename: TEDMusical_2014-480p.mp4
1399579128.336851 [ted_subtitles] INFO: subtitle url: http://www.ted.com/talks/subtitles/id/1962/lang/eng
1399579128.996226 [gpodder.gtkui.main] INFO: All tasks have finished.
1399579129.035496 [gpodder.gtkui.main] INFO: All tasks have finished.
1399579129.099886 [ted_subtitles] INFO: episode url: http://feedproxy.google.com/~r/TedtalksHD/~3/DKXNGZwfYwo/daffodil_hudson_is_this_the_cure_for_stage_fright
1399579130.692832 [gpodder.extensions] ERROR: Error in /usr/share/gpodder/extensions/ted_subtitles.py in on_episode_downloaded: list index out of range
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/gpodder/extensions.py", line 83, in handler
    cb_res = callback(*args, **kwargs)
  File "/usr/share/gpodder/extensions/ted_subtitles.py", line 92, in on_episode_downloaded
    intro = episode_data.split('introDuration%22%3A')[1] \
IndexError: list index out of range

But it's Python and can be easily fixed!

As I see, TED description page format changed.

To fix it:

  • replace 'introDuration%22%3A' with 'introDuration":' and
  • replace '%2C' with ','

in /usr/share/gpodder/extensions/ted_subtitles.py.

I.e. starting from line 89 this code:

        # intro in the data could be 15 or 15.33
        intro = episode_data.split('introDuration%22%3A')[1] \
                            .split('%2C')[0] or INTRO_DEFAULT

should became:

        # intro in the data could be 15 or 15.33
        intro = episode_data.split('introDuration":')[1] \
                            .split(',')[0] or INTRO_DEFAULT

After this subtitles should be downloaded in the same directory with downloaded video (under same as video with but with .srt extension).

Tested on Ubuntu 14.04 with gPodder 3.5.2.

EDIT: I made pull request to gPodder with fix: https://github.com/gpodder/gpodder/pull/121

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.