View Single Post
  #404  
Old 01-09-2011, 05:12 PM
Anywho Anywho is offline
Batch File Basher
 
Join Date: Jul 2010
Posts: 204
Anywho is on a distinguished road
Default

Re: How to use iView (ABC Australia) downloaders


Quote:
Originally Posted by Yansky View Post
On line 20 of the .command change the params again and add the "-z" parameter for "debug level output"

That should reveal some more info.
I think what is happening is that the Akamai server is being selected but the filename given to RTMPdump is for the Hostworks server.

edit: Ahh! The problem is exactly that. The script is not getting the HOST and TOKEN first. Then when it comes to decide which filename format to use, it is always picking HOSTWORKS because the HOST variable hasn't been defined first. The structure of that code has to be changed slightly so that the HOST and TOKEN is gotten from the ABC server first.

So this code:
Code:
echo Retrieving Token...
curl -q "http://tviview.abc.net.au/iview/auth/?v2" > "$TEMPDIR"/auth.xml
TOKEN=`cat "$TEMPDIR"/auth.xml | grep token | sed 's/.*<token>//g' | sed 's/\\&amp;/\\&/g' | sed 's,</token>.*,,g' | sed 's/ //g'`
HOST=`cat "$TEMPDIR"/auth.xml | grep host | sed 's/<host>//g' | sed 's,</host>,,g' | sed 's/ //g' | tr -d '\r'`
will have to be moved between these two lines of code:
Code:
while [ $RETRY -gt 0 ]; do
<put it here>
#Generate the right token & filename
Reply With Quote