[Python-ideas] Support data: URLs in urllib

Mathias Panzenböck grosser.meister.morti at gmx.net
Thu Nov 15 23:45:31 CET 2012


On 11/08/2012 07:11 AM, Senthil Kumaran wrote:
> On Wed, Nov 7, 2012 at 9:24 AM, Mathias Panzenböck
> <grosser.meister.morti at gmx.net> wrote:
>> Sorry, I don't quite understand.
>> Do you mean the parse_data_url function should be removed and put into
>> DataResponse (or DataHandler)?
>>
>>
>>> and expected results be returned should be considered?
>>
>>
>> What expected results? And in what way should they be considered? Considered
>> for what?
>
> I meant, urlopen("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
> AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
> 9TXL0Y4OHwAAAABJRU5ErkJggg==")
>
> should work out of box, wherein the DataHandler example that is the
> documentation is made available in request.py and added to
> OpenerDirector by default. I find it hard to gauge the utility, but
> documentation is ofcourse a +1.
>
> Thanks,
> Senthil
>

Yes, I would also be in favor to including this in python, but I was told here I should write it as 
recipe in the documentation.

It is e.g. useful for crawlers/spiders, that analyze webpages including their images.



More information about the Python-ideas mailing list