how to download special range content with requests in python?

Joel Goldstick joel.goldstick at gmail.com
Wed Jul 23 09:08:20 EDT 2014


On Wed, Jul 23, 2014 at 9:03 AM, Joel Goldstick
<joel.goldstick at gmail.com> wrote:
>
>
>
>
> On Wed, Jul 23, 2014 at 5:44 AM, 水静流深 <1248283536 at qq.com> wrote:
>>
>> url='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 = requests.get(url).read(0,1000)  ‍
>>
>> why i can not download special range(from 0 to 10000)  content with requests  in python‍?
>
>
> 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?


Also:
file.read([size])

a file object can take a size, but not two arguments aparently



>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
>
>
> --
> Joel Goldstick
> http://joelgoldstick.com




-- 
Joel Goldstick
http://joelgoldstick.com



More information about the Python-list mailing list