[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TV] [Fwd: WGET Script Problem]



Hi,
the problem is that the string:

For Linux VDR from Germany (brian_dorling@xxxxxxxxxxx)

is not being seen as a single entity and therefore WGET is taking the "For"
as bleonging to the -U parameter, and the rest as URLs. See below:


My BBC WGET Script 27/02/2004 V1.00

For Linux VDR from Germany (brian_dorling@xxxxxxxxxxx)
+ wget -UFor Linux VDR from Germany '(brian_dorling@xxxxxxxxxxx)' -Obleb-xmltv.bz2 'http://bleb.org/tv/data/listings?days=-1,1,1&format=XMLTV&file=BZIP2&channels=bbc1,bbc2,bbc3,bbc4'
--15:41:12--  http://linux/
           => `bleb-xmltv.bz2'
Resolving linux... failed: Host not found.
--15:41:12--  http://vdr/
           => `bleb-xmltv.bz2'
Resolving vdr... failed: Host not found.
--15:41:12--  http://from/
           => `bleb-xmltv.bz2'
Resolving from... failed: Host not found.
--15:41:12--  http://germany/
           => `bleb-xmltv.bz2'
Resolving germany... failed: Host not found.
--15:41:12--  http://(brian_dorling@xxxxxxxxxxx)/
           => `bleb-xmltv.bz2'
Resolving t-online.de)... failed: Host not found.
--15:41:12-- http://bleb.org/tv/data/listings?days=-1,1,1&format=XMLTV&file=BZIP2&channels=bbc1,bbc2,bbc3,bbc4
           => `bleb-xmltv.bz2'
Resolving bleb.org... done.
Connecting to bleb.org[163.1.215.97]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-bzip]

[ <=> ] 19,114 37.86K/s

15:41:14 (37.86 KB/s) - `bleb-xmltv.bz2' saved [19114]

This works from a script, but with errors, if I code it like this:

WGETCMD="wget -U${APPL} -O${LOC} ${TVDATA}"

Cheers Brian






Brian Dorling wrote:

If I look at this with "set -x" the WGEt command looks like this:

wget '-U'\''For' Linux VDR from Germany '(brian_dorling@xxxxxxxxxxx)'\''' '-O'\''bleb-xmltv.bz2'\''' ''\''http://bleb.org/tv/data/listings?days=-1,1,1&format=XMLTV&file=BZIP2&channels=bbc1,bbc2,bbc3,bbc4'\'''

An this one will not run if pasted into a shell.

Cheers Brian



Brian Dorling wrote:

Andrew,
I basically found what to do on your site and copied it:

#!/bin/bash
#set -x
echo "My BBC WGET Script 27/02/2004 V1.00"


BASE_URL='http://bleb.org/tv/data/listings'
DAYS=-1,1,1
FORMAT=XMLTV
FILE=BZIP2
CHANNELS=bbc1,bbc2,bbc3,bbc4
APPL="For Linux VDR from Germany (brian_dorling@xxxxxxxxxxx)"
LOC=bleb-xmltv.bz2

#echo $BASE_URL
#echo $DAYS
#echo $FORMAT
#echo $FILE
#echo $CHANNELS


TVDATA="$BASE_URL?days=$DAYS&format=$FORMAT&file=$FILE&channels=$CHANNELS"

WGETCMD="wget -U'$APPL' -O'$LOC' '$TVDATA'"
echo ""
echo ""
echo $WGETCMD

$WGETCMD
exit

Cheers Brian


Andrew Flegg wrote:

In list.comp.tv, Brian wrote:

somehow the post got corrupted.
The "days=3D-1,1,1" stuff (in various places) should read "days=-1,1,1". Not sure where those extra "3D" characters came from.




It's an encoding of =, "=3D" - equivalent to "%2D" in a URL, for
example. Dunno why your original post needed encoding, but something
thought it did.

Anyway, you wrote:

as I am new to this, maybe someone can help even thought it is slightly
off-topic:




That's not a problem.


My BBC WGET Script 27/02/2004 V1.00
wget -U'For Linux VDR from Germany (brian_dorling@xxxxxxxxxxx)'
-O'bleb-xmltv.bz2'
'http://bleb.org/tv/data/listings?days=-1,1,1&format=XMLTV&file=BZIP2&channels=3Dbbc1,bbc2,bbc3,bbc4'


[snip]

Has anyone any ideas what is wrong? Obviously its staring to parse the -U
parameters as a URL, but why?




Sounds like the quotes are being lost. What platform/language is the
script written in? Can you paste it into a list posting/put it online
somewhere?

Cheers,

Andrew





----------------------------------------------------------------------
Distributed to the bleb.org/tv developer list.
Archive available at: http://www.bleb.org/tv/maillist/

To unsubscribe, send 'UNSUBSCRIBE brian_dorling@xxxxxxxxxxx' to
mailto:tvdevel-request@xxxxxxxxx If you have any problems please contact
mailto:listmaster@xxxxxxxx






----------------------------------------------------------------------
Distributed to the bleb.org/tv developer list.
Archive available at: http://www.bleb.org/tv/maillist/

To unsubscribe, send 'UNSUBSCRIBE brian_dorling@xxxxxxxxxxx' to
mailto:tvdevel-request@xxxxxxxxx If you have any problems please contact
mailto:listmaster@xxxxxxxx