On 11/11/2010 06:37 PM, Peter Otten wrote:

> The problem is indeed not Python-related. The provider of the images doesn't 
> like what you're trying to do and verifies the referer, i. e. that the page 
> you claim to be coming from is acceptable. Here's one way to satisfy that 
> check:
> 
>>>> from urllib2 import Request, urlopen
>>>> r = Request("http://www.infometeo.be/img.php?iid=1057";, 
> headers=dict(Referer="http://www.infometeo.be/img.php?iid=1057";))
>>>> img = urlopen(r).read()
>>>> with open("tmp.jpg", "w") as f: f.write(img)
> ...
>>>>
> 
> Now if you are using that workaround a lot he may come up with more 
> sophisticated techniques. So dont ;)
> 
> Peter

Thanks Peter, it works perfectly !
At 60 fps I can even make a video ...
;-)

Olivier
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to