Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36411
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rodrick.brown@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; '__name__': 0.07; 'urllib2': 0.07; 'python': 0.09; 'subject:files': 0.09; 'cc:addr :python-list': 0.10; 'subject:python': 0.11; 'skip:# 20': 0.13; "'__main__':": 0.16; '11:19': 0.16; 'subject:download': 0.16; 'subject:internet': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'import': 0.21; 'cc:2**0': 0.23; 'example': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'skip:# 10': 0.27; 'message-id:@mail.gmail.com': 0.27; 'url:mailman': 0.29; 'subject: ?': 0.30; 'implement': 0.32; 'url:python': 0.32; 'file': 0.32; 'url:listinfo': 0.32; 'received:google.com': 0.34; 'thanks': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'skip:u 20': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'skip:o 20': 0.38; 'header:Received:5': 0.40; 'url:mail': 0.40; '!!!': 0.62; 'show': 0.63; ',the': 0.84; '2013': 0.84; 'to:addr:163.com': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VLfu5X9P3BVb7j/lpBgbyE7Uhcb6fNOl6WXmcVRnT/E=; b=F1Da1RQvjGJ4tJVA65RIU+DhuL3zkcuhQHymIsJnTUCriqpjQk2cW6iNXRCNbmAIAY UgCWyLTajXU2zDNUIG90F269WOC/nugBL5B/oS157nhOChzLUsX8C7P3mO7BI2nlJ2Bs tWejj+D6Oypsn3B6nJf/jFP7ThSread8KX1ZhjbuLTsFlQEs+BQcOsny++d5Sv7bvfc6 YOFcRlGYOI45BkUMrbUjimIHj0kUTVLHuoBAmOQcF3D6LiohRksQZkW+T60fuX7JlyH+ +ZmbSKSqwJM1krhKgNf8dSXG5swpX+AZk92pmYApp4a22V02bxgx2rDaU27T640eVpLM 3lnQ== |
| MIME-Version | 1.0 |
| In-Reply-To | <e4fc5450-8816-471f-8f03-ed9229b64602@googlegroups.com> |
| References | <e4fc5450-8816-471f-8f03-ed9229b64602@googlegroups.com> |
| From | Rodrick Brown <rodrick.brown@gmail.com> |
| Date | Tue, 8 Jan 2013 00:00:37 -0500 |
| Subject | Re: how to download internet files by python ? |
| To | iMath <redstone-cold@163.com> |
| Content-Type | multipart/alternative; boundary=047d7b15ae815e3c4204d2bfd553 |
| Cc | "python-list@python.org" <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.260.1357621271.2939.python-list@python.org> (permalink) |
| Lines | 66 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1357621271 news.xs4all.nl 6881 [2001:888:2000:d::a6]:49686 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:36411 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Mon, Jan 7, 2013 at 11:19 PM, iMath <redstone-cold@163.com> wrote:
> for example ,if I want to download this file ,how to implement the
> download functionality by python ?
>
> http://down.51voa.com/201208/se-ed-foreign-students-friends-16aug12.mp3
>
> as for download speed ,of course ,the fast ,the better ,so how to
> implement it ?
>
> It would be better to show me an example :) thanks !!!
> --
> http://mail.python.org/mailman/listinfo/python-list
>
#!/usr/bin/python
import urllib2
if __name__ == '__main__':
fileurl='
http://down.51voa.com/201208/se-ed-foreign-students-friends-16aug12.mp3'
mp3file = urllib2.urlopen(fileurl)
with open('outfile.mp3','wb') as output:
output.write(mp3file.read())
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to download internet files by python ? iMath <redstone-cold@163.com> - 2013-01-07 20:19 -0800
Re: how to download internet files by python ? Cameron Simpson <cs@zip.com.au> - 2013-01-08 15:44 +1100
Re: how to download internet files by python ? Roy Smith <roy@panix.com> - 2013-01-08 00:04 -0500
Re: how to download internet files by python ? iMath <redstone-cold@163.com> - 2013-01-09 18:08 -0800
Re: how to download internet files by python ? Tim Roberts <timr@probo.com> - 2013-01-09 20:31 -0800
Re: how to download internet files by python ? Rodrick Brown <rodrick.brown@gmail.com> - 2013-01-08 00:00 -0500
Re: how to download internet files by python ? MRAB <python@mrabarnett.plus.com> - 2013-01-08 15:19 +0000
csiph-web