16.08.2018, 09:32
Hi,
I still don't know how to make a snapshoot from my ip camera and save or send it.
I have created a DNS to share the url in case you want to test it and help me. The camera is covered by privacy reasons...
IP : http://dnspruebacamara.myqnapcloud.com:5858/
user: admin
pass: 123456789
I have test it from web explorers (chrome or firefox) and it works perfectly from Them:
http://admin:123456789@dnspruebacamara.m...pshot.jpeg
where ts=... is a random number that i must change by code, for the navigator not to ask me again the security credencials
.... But I can not get it work from the following code:
image_type = 'jpeg'
image_name_attachment = 'snapshot'
source_image_url = 'http://admin:123456789@dnspruebacamara.myqnapcloud.com:5858/cgi-bin/snapshot.cgi?1&ts=4561248/snapshot.jpeg'
where ts=... is a random number that i must change by code, for the navigator not to ask me again the security credencials
--Get remote (from HTTP) image and put image file to HL (will be deleted when end of script)
os.execute('wget -O /www/scada/vis/' .. image_name_attachment .. '.' .. image_type .. ' ' .. source_image_url .. '')
or I have also tried this other code, and it did not work either:
image = socket.http.request(source_image_url)
I know that I am doing something wrong, but I dont know what I am missing.
Can anyone help me please???
Best regards
I still don't know how to make a snapshoot from my ip camera and save or send it.
I have created a DNS to share the url in case you want to test it and help me. The camera is covered by privacy reasons...
IP : http://dnspruebacamara.myqnapcloud.com:5858/
user: admin
pass: 123456789
I have test it from web explorers (chrome or firefox) and it works perfectly from Them:
http://admin:123456789@dnspruebacamara.m...pshot.jpeg
where ts=... is a random number that i must change by code, for the navigator not to ask me again the security credencials
.... But I can not get it work from the following code:
image_type = 'jpeg'
image_name_attachment = 'snapshot'
source_image_url = 'http://admin:123456789@dnspruebacamara.myqnapcloud.com:5858/cgi-bin/snapshot.cgi?1&ts=4561248/snapshot.jpeg'
where ts=... is a random number that i must change by code, for the navigator not to ask me again the security credencials
--Get remote (from HTTP) image and put image file to HL (will be deleted when end of script)
os.execute('wget -O /www/scada/vis/' .. image_name_attachment .. '.' .. image_type .. ' ' .. source_image_url .. '')
or I have also tried this other code, and it did not work either:
image = socket.http.request(source_image_url)
I know that I am doing something wrong, but I dont know what I am missing.
Can anyone help me please???
Best regards