Retrieve JPG from url [solved]
Posted: Thu Mar 31, 2016 10:46 am
Hey,
On my foscam I can retrieve an image by the url, but I what to save that image to my raspberry with a python script.
url = http://192.168.0.184:88/cgi-bin/CGIProx ... R&pwd=PASS
I've tried already this script, but i've got always a black JPG file. (74K)
When I save the image manually it's about 144KB
Any other solutions?
The url is not the real image, but the url retrieves the image.
When I look in to the code i see only this
Thanks in advance
On my foscam I can retrieve an image by the url, but I what to save that image to my raspberry with a python script.
url = http://192.168.0.184:88/cgi-bin/CGIProx ... R&pwd=PASS
I've tried already this script, but i've got always a black JPG file. (74K)
When I save the image manually it's about 144KB
Code: Select all
import urllib
resource = urllib.urlopen("http://192.168.0.184:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture&usr=USER&pwd=PASS")
output = open("l-file01.jpg","wb")
output.write(resource.read())
output.close()The url is not the real image, but the url retrieves the image.
When I look in to the code i see only this
Code: Select all
<html><body><img src="../snapPic/Snap_20160331-143832.jpg"/></body></html>Thanks in advance