wget

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

wget

Post by jameswilson »

can anyone get wget to work with zms, i want to use zms to grab me an image and save locally but whenever i try i getno data recieved and eventually it gives up. It looks like its breaking up the url

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

ok then i can get wget to download the jpeg from zms if i encapsulate the path with quotes. Problem is i want to call a shell command

eg shell "wget http://jpg1.jpg"
and as i need the quoptes around the path statemant this is causing me grief. As i know little about wget can i tell it its a pth without the " or can i ue it in my scripte without the double "

Im using gambas. In vb.net i can just use """ but this wont work in linux so im hoping i can do the " thing without the " in wget

Many Thanks

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I'm a bit confused about which quotes are which but you should be able to do

Code: Select all

"wget 'http://<...>'"
shouldn't you? Unless you want to expand shell variables then single and double quotes are pretty much the same in shells.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

you would have thought so but if i do that i get
http://192.167.0.3/cgi-Bin/nph-zms?mode ... ass=xxxxxx
=> `nph-zms?mode=single&monitor=2&scale=100&user=admin&pass=xxxxxx'
Connecting to 192.167.0.3:80... connected.
HTTP request sent, awaiting response... 404 Not Found
19:41:54 ERROR 404: Not Found.
wgt seems to break apart the url unless tyhe quotes are in place. If i run from shell without quotes around the url i get an error. I need to get wget to download the still without the quotes, ny ideas
?

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

You have typed cgi-Bin rather than cgi-bin. That may be significant.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

[root@localhost ~]# wget http://192.167.0.3/cgi-bin/nph-zms?mode ... ss=xxxxxxx



[1] 4721
[2] 4722
[3] 4723
[4] 4724
--19:48:06-- http://192.167.0.3/cgi-bin/nph-zms?mode=single
=> `nph-zms?mode=single'
Connecting to 192.167.0.3:80... [root@localhost ~]# connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--19:48:08-- http://192.167.0.3/cgi-bin/nph-zms?mode=single
(try: 2) => `nph-zms?mode=single'
Connecting to 192.167.0.3:80... connected.
HTTP request sent, awaiting response... No data received.
Retrying.
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

sorted needed an extra space after the last ' before the last "

Thanks Phil
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Post Reply