Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.035 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'cc:addr:python-list': 0.11; '23,': 0.16; 'code?': 0.16; 'guessing': 0.16; 'subject:download': 0.16; 'subject:requests': 0.16; 'url:debian': 0.16; 'url:iso': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'work,': 0.20; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'url:edu': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'requests': 0.31; 'large.': 0.31; 'anyone': 0.31; 'file': 0.32; 'probably': 0.32; 'run': 0.32; 'quite': 0.32; 'url:python': 0.33; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'heard': 0.39; '8bit%:6': 0.40; 'url:mail': 0.40; 'url:0': 0.67; 'skip:r 30': 0.69; 'jul': 0.74; 'special': 0.74; '\xe2\x80\x8d': 0.84; 'joel': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2bMkmgnNfzHLxTzULFe/d1mcx7Z033wtTMTGEeSI8GM=; b=GiPy5Vs9xxPZFPtmcfaWVdMkhbpgBlnt09arxFjtaks7xfxZUvPYA3qhNS0IjA4HCa 24jaPFSjWy0rHw8yCZsL4Rgz0wGdLbn24ENe7DKc4agJPtN/LEeBnA9NSS1M7v9Neu3g K3sJrDsszl+LRFL0zdwePdQvCyogERRPe5Mzl8P3PQhpNOh21gvaGoI+6fyiEnv6LvZF HbvNhAdTCgM5k42x5VE7VdkTciE/a2j6vroRmNlb8CCfJaEjKFPuuOLaGX+Urp6dr+7g 2KMk4D7CaY9bt1wYKBOTHJOMcC1DpycGcpNBM5liied/5EkYYPDapDCWsPpaRg7MEg1K NHFQ== MIME-Version: 1.0 X-Received: by 10.52.154.106 with SMTP id vn10mr1468737vdb.36.1406120638017; Wed, 23 Jul 2014 06:03:58 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Jul 2014 09:03:57 -0400 Subject: Re: how to download special range content with requests in python? From: Joel Goldstick To: =?UTF-8?B?5rC06Z2Z5rWB5rex?= <1248283536@qq.com> Content-Type: multipart/alternative; boundary=bcaec51d2f4823f4eb04fedbf90a Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 67 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406120646 news.xs4all.nl 2831 [2001:888:2000:d::a6]:38242 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75084 --bcaec51d2f4823f4eb04fedbf90a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 23, 2014 at 5:44 AM, =E6=B0=B4=E9=9D=99=E6=B5=81=E6=B7=B1 <1248= 283536@qq.com> wrote: > url=3D' > http://debian.cites.illinois.edu/pub/debian-cd/7.6.0/amd64/iso-cd/debian-= 7.6.0-amd64-CD-1.iso > ' > import requests > r =3D requests.get(url).read(0,1000) =E2=80=8D > > why i can not download special range(from 0 to 10000) content with > requests in python=E2=80=8D? > I've never heard of anyone reading an iso file with requests. I'm guessing it will work, but it is probably quite large. What actually happens when you run your code? > > -- > https://mail.python.org/mailman/listinfo/python-list > > --=20 Joel Goldstick http://joelgoldstick.com --bcaec51d2f4823f4eb04fedbf90a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Wed, Jul 23, 2014 at 5:44 AM, =E6=B0=B4=E9=9D=99=E6=B5=81=E6=B7= =B1 <1248283536@qq.com> wrote:
url=3D'http://debian.cites.illinois.edu/pub/debian-cd/7.6.0/amd64/= iso-cd/debian-7.6.0-amd64-CD-1.iso'
import requests
r =3D requests.get(url).read(0,1000)=C2=A0 = =E2=80=8D

why i can not download special range(from 0 to 1000= 0)=C2=A0 content with requests=C2=A0 in python=E2=80=8D?

I've never heard of anyone reading an iso file with= requests.=C2=A0 I'm guessing it will work, but it is probably quite la= rge.

What actually happens when you run your code?

--
https://mail.python.org/mailman/listinfo/python-list




--
Joel Goldstick
http://joelgoldstick.com
--bcaec51d2f4823f4eb04fedbf90a--