如何从ted上下载字幕

本来已经有人写了python脚本从ted上下载字幕了,但是他的网站被墙同时有些ted的地址他解析不了,

所以我将他的python 脚本下载了下来,修改了一下。

 

谢谢: http://tedtalksubtitledownload.appspot.com/

 

source 如下:

要使用它的话,需要先下载simplejson包,地址是: http://pypi.python.org/pypi/simplejson/

在通过http代理上网的环境中也可以使用。

 

具体使用例子如下:

D:/Document and Setting/test/My Documents/Downloads/TEDTalkSubtitles>TEDTalkSub
itles.py
http://www.ted.com/talks/barry_schwartz_on_the_paradox_of_choice.html
Loading information about TED talk number http://www.ted.com/talks/barry_schwar
z_on_the_paradox_of_choice.html...
Download all subtitles (write 'all' when prompted) or only one (specify wich)?
chi_hans
Downloading subtitles for language chi_hans

D:/Document and Setting/test/My Documents/Downloads/TEDTalkSubtitles>dir
 ドライブ D のボリューム ラベルは programe です
 ボリューム シリアル番号は 447B-7E2B です

 D:/Document and Setting/test/My Documents/Downloads/TEDTalkSubtitles のディレク
トリ

2011/04/15  14:16    <DIR>          .
2011/04/15  14:16    <DIR>          ..
2011/04/15  14:34            31,879 subs_93_chi_hans.srt
2011/04/15  14:16            31,928 subs_93_eng.srt
2011/04/15  14:26             2,639 TEDTalkSubtitles.py
               3 個のファイル              66,446 バイト
               2 個のディレクトリ  13,469,048,832 バイトの空き領域

D:/Document and Setting/test/My Documents/Downloads/TEDTalkSubtitles>

 

refs:

http://pythonconquerstheuniverse.wordpress.com/category/the-python-debugger/

http://meyerweb.com/eric/tools/dencoder/

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值