﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Timothy&#039;s Space &#187; Python</title>
	<atom:link href="http://www.xiaozhou.net/category/python/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xiaozhou.net</link>
	<description>君看一叶舟，出没风波里</description>
	<lastBuildDate>Tue, 07 Feb 2012 04:28:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>VOA Special English MP3 Downloader</title>
		<link>http://www.xiaozhou.net/python/voa_special_english_mp3_downloader-2010-03-10.htm</link>
		<comments>http://www.xiaozhou.net/python/voa_special_english_mp3_downloader-2010-03-10.htm#comments</comments>
		<pubDate>Tue, 09 Mar 2010 17:01:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[downloader]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[special]]></category>
		<category><![CDATA[VOA]]></category>
		<category><![CDATA[下载]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/python/voa-special-english-mp3-downloader-2010-03-10.htm</guid>
		<description><![CDATA[最近上下班开车挺无聊，听腻了各式音乐，打算利用上下班的时间学学英语，锻炼下生锈的耳朵，听听English MP3。以前一直比较喜欢VOA Special English的慢速版，虽然还是有一定的难度，但听起来多少能找到点感觉。今天突然心血来潮，google了下VOA的老家，很不幸，网页无法打开，第一直觉就是VOA被伟大的wall给挡住了。搜索了一下，果然如此……不过咱有SSH，怕啥？通过SSH果然可以正常访问，这也印证了前面的猜想。不过VOA的mp3貌似每天都出，一个一个点链接下载，实在是个体力活，人本来就有惰性，俺也不例外！于是，有了下面的想法…… 咱IT民工，比较拿手的就是让电脑帮俺们去完成一些重复劳动，减轻体力负担，如果能让电脑自动帮俺下载mp3该多好！加之最近又在看python的东东，python很强大，几行代码就能完成复杂的工作。于是开始手痒，何不用python搞个下载器试试呢？ 对了，有wall，怎么办？不怕！咱有VPS，哈哈哈！ 开工！在VOA的页面，上找到RSS页面地址(RSS页面包含有最新发布的文章以及mp3下载链接)，然后对RSS进行分析，写python脚本，调试，运行，效果还不错！最近发布文章的mp3被啪啪啪的拖到了VPS上。脚本十分简单： ?View Code PYTHON1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/usr/bin/python #VOA Special English MP3 Downloader. #Written by Timothy 2010.3.10 import urllib,time; from xml.dom import minidom from os import system url = &#34;http://www1.voanews.com/templates/Articles.rss?sectionPath=/learningenglish/home&#34; link = urllib.urlopen&#40;url&#41; #content=link.read() rss = minidom.parse&#40;link&#41; elements [...]]]></description>
			<content:encoded><![CDATA[<p>最近上下班开车挺无聊，听腻了各式音乐，打算利用上下班的时间学学英语，锻炼下生锈的耳朵，听听English MP3。以前一直比较喜欢VOA Special English的慢速版，虽然还是有一定的难度，但听起来多少能找到点感觉。今天突然心血来潮，google了下VOA的老家，很不幸，网页无法打开，第一直觉就是VOA被伟大的wall给挡住了。搜索了一下，果然如此……不过咱有SSH，怕啥？通过SSH果然可以正常访问，这也印证了前面的猜想。不过VOA的mp3貌似每天都出，一个一个点链接下载，实在是个体力活，人本来就有惰性，俺也不例外！于是，有了下面的想法……</p>
<p>咱IT民工，比较拿手的就是让电脑帮俺们去完成一些重复劳动，减轻体力负担，如果能让电脑自动帮俺下载mp3该多好！加之最近又在看python的东东，python很强大，几行代码就能完成复杂的工作。于是开始手痒，何不用python搞个下载器试试呢？ 对了，有wall，怎么办？不怕！咱有VPS，哈哈哈！</p>
<p>开工！在VOA的页面，上找到<a href="http://www1.voanews.com/templates/Articles.rss?sectionPath=/learningenglish/home" target="_blank">RSS页面地址</a>(RSS页面包含有最新发布的文章以及mp3下载链接)，然后对RSS进行分析，写python脚本，调试，运行，效果还不错！最近发布文章的mp3被啪啪啪的拖到了VPS上。脚本十分简单：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p558code3'); return false;">View Code</a> PYTHON</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5583"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p558code3"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #808080; font-style: italic;">#VOA Special English MP3 Downloader.</span>
<span style="color: #808080; font-style: italic;">#Written by Timothy 2010.3.10</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib</span>,<span style="color: #dc143c;">time</span><span style="color: #66cc66;">;</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">xml</span>.<span style="color: black;">dom</span> <span style="color: #ff7700;font-weight:bold;">import</span> minidom
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">os</span> <span style="color: #ff7700;font-weight:bold;">import</span> system
url = <span style="color: #483d8b;">&quot;http://www1.voanews.com/templates/Articles.rss?sectionPath=/learningenglish/home&quot;</span>
link = <span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;">#content=link.read()</span>
rss = minidom.<span style="color: black;">parse</span><span style="color: black;">&#40;</span>link<span style="color: black;">&#41;</span>
elements = rss.<span style="color: black;">getElementsByTagName</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'media:content'</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> element <span style="color: #ff7700;font-weight:bold;">in</span> elements:
	<span style="color: #ff7700;font-weight:bold;">if</span> element.<span style="color: black;">hasAttribute</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'type'</span><span style="color: black;">&#41;</span>:
		<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Now downloading:'</span> + element.<span style="color: black;">getAttribute</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'url'</span><span style="color: black;">&#41;</span>
		system<span style="color: black;">&#40;</span><span style="color: #483d8b;">'wget -nc  '</span> + element.<span style="color: black;">getAttribute</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'url'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>运行效果：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p558code4'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5584"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
</pre></td><td class="code" id="p558code4"><pre class="bash" style="font-family:monospace;">timothy<span style="color: #000000; font-weight: bold;">@</span>vps:~$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
VOAEnglish.py
timothy<span style="color: #000000; font-weight: bold;">@</span>vps:~$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x VOAEnglish.py
timothy<span style="color: #000000; font-weight: bold;">@</span>vps:~$ .<span style="color: #000000; font-weight: bold;">/</span>VOAEnglish.py 
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-sin-<span style="color: #000000;">2578</span>-smoking-09mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">40</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-sin-<span style="color: #000000;">2578</span>-smoking-09mar10.Mp3
Resolving www.voanews.com... 72.247.217.25, 72.247.217.9
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.25<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">7765680</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>7.4M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-sin-<span style="color: #000000;">2578</span>-smoking-09mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 7,765,680   10.0M/s   in 0.7s    
&nbsp;
2010-03-09 16:37:41 (10.0 MB/s) - `se-sin-2578-smoking-09mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">7765680</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7765680</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-ag-broccoli-9mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">41</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-ag-broccoli-9mar10.Mp3
Resolving www.voanews.com... 72.247.217.25, 72.247.217.9
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.25<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">1905683</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>1.8M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-ag-broccoli-9mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 1,905,683   9.44M/s   in 0.2s    
&nbsp;
2010-03-09 16:37:41 (9.44 MB/s) - `se-ag-broccoli-9mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1905683</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1905683</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-dev-int-womens-day-8mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">41</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-dev-int-womens-day-8mar10.Mp3
Resolving www.voanews.com... 72.247.217.25, 72.247.217.9
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.25<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">1907146</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>1.8M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-dev-int-womens-day-8mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 1,907,146   8.81M/s   in 0.2s    
&nbsp;
2010-03-09 16:37:41 (8.81 MB/s) - `se-dev-int-womens-day-8mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1907146</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1907146</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-tia-molly-brown-05mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">41</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-tia-molly-brown-05mar10.Mp3
Resolving www.voanews.com... 72.247.217.9, 72.247.217.25
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.9<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">7429432</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>7.1M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-tia-molly-brown-05mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 7,429,432   8.68M/s   in 0.8s    
&nbsp;
2010-03-09 16:37:42 (8.68 MB/s) - `se-tia-molly-brown-05mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">7429432</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7429432</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-pia-todd-duncan-7mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">42</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-pia-todd-duncan-7mar10.Mp3
Resolving www.voanews.com... 72.247.217.9, 72.247.217.25
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.9<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">7470601</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>7.1M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-pia-todd-duncan-7mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 7,470,601   6.06M/s   in 1.2s    
&nbsp;
2010-03-09 16:37:43 (6.06 MB/s) - `se-pia-todd-duncan-7mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">7470601</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7470601</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-itn-tea-party-6mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">43</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-itn-tea-party-6mar10.Mp3
Resolving www.voanews.com... 72.247.217.25, 72.247.217.9
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.25<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">2405145</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>2.3M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-itn-tea-party-6mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 2,405,145   3.98M/s   in 0.6s    
&nbsp;
2010-03-09 16:37:44 (3.98 MB/s) - `se-itn-tea-party-6mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2405145</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2405145</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-econ-corp-history-5mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">44</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-econ-corp-history-5mar10.Mp3
Resolving www.voanews.com... 72.247.217.9, 72.247.217.25
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.9<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">1940583</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>1.9M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-econ-corp-history-5mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 1,940,583   6.77M/s   in 0.3s    
&nbsp;
2010-03-09 16:37:44 (6.77 MB/s) - `se-econ-corp-history-5mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1940583</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1940583</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Now downloading:http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-mosaic-05mar10.Mp3
<span style="color: #660033;">--2010-03-09</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">44</span>--  http:<span style="color: #000000; font-weight: bold;">//</span>www.voanews.com<span style="color: #000000; font-weight: bold;">/</span>MediaAssets2<span style="color: #000000; font-weight: bold;">/</span>learningenglish<span style="color: #000000; font-weight: bold;">/</span>dalet<span style="color: #000000; font-weight: bold;">/</span>se-mosaic-05mar10.Mp3
Resolving www.voanews.com... 72.247.217.9, 72.247.217.25
Connecting to www.voanews.com<span style="color: #000000; font-weight: bold;">|</span>72.247.217.9<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000;">80</span>... connected.
HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
Length: <span style="color: #000000;">7341034</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>7.0M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>audio<span style="color: #000000; font-weight: bold;">/</span>mpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Saving to: <span style="color: #000000; font-weight: bold;">`</span>se-mosaic-05mar10.Mp3<span style="color: #ff0000;">'
&nbsp;
100%[==========================&gt;] 7,341,034   9.01M/s   in 0.8s    
&nbsp;
2010-03-09 16:37:45 (9.01 MB/s) - `se-mosaic-05mar10.Mp3'</span> saved <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">7341034</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7341034</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
timothy<span style="color: #000000; font-weight: bold;">@</span>vps:~$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
se-ag-broccoli-9mar10.Mp3         se-pia-todd-duncan-7mar10.Mp3
se-dev-int-womens-day-8mar10.Mp3  se-sin-<span style="color: #000000;">2578</span>-smoking-09mar10.Mp3
se-econ-corp-history-5mar10.Mp3   se-tia-molly-brown-05mar10.Mp3
se-itn-tea-party-6mar10.Mp3       VOAEnglish.py
se-mosaic-05mar10.Mp3
timothy<span style="color: #000000; font-weight: bold;">@</span>vps:~$</pre></td></tr></table></div>

<p>VPS和VOA都在米国，下载速度很快啊……几秒钟的功夫…… </p>
<p>最后，再想办法把mp3统统拖回来本地即可。此脚本适合拥有VPS的、有兴趣的同学使用，后续会慢慢改进脚本。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/python/voa_special_english_mp3_downloader-2010-03-10.htm/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-pia-todd-duncan-7mar10.Mp3" length="7470601" type="audio/mpeg" />
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-tia-molly-brown-05mar10.Mp3" length="7429432" type="audio/mpeg" />
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-sin-2578-smoking-09mar10.Mp3" length="7765680" type="audio/mpeg" />
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-ag-broccoli-9mar10.Mp3" length="1905683" type="audio/mpeg" />
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-dev-int-womens-day-8mar10.Mp3" length="1907146" type="audio/mpeg" />
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-itn-tea-party-6mar10.Mp3" length="2405145" type="audio/mpeg" />
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-econ-corp-history-5mar10.Mp3" length="1940583" type="audio/mpeg" />
<enclosure url="http://www.voanews.com/MediaAssets2/learningenglish/dalet/se-mosaic-05mar10.Mp3" length="7341034" type="audio/mpeg" />
		</item>
	</channel>
</rss>

