If anyone is interested here is my download script that I run using crontab to find the first link on the Democracy Now webpage. Just change USERNAME to whatever the username is called on your system. It creates a filelist.txt to keep track of what has been downloaded.
#!/bin/bash site="http://www.democracynow.org/podcast.xml" cd /home/USERNAME/scripts/democracynow # rename old webpage mv /home/USERNAME/scripts/democracynow/podcast.xml /home/USERNAME/scripts/democracynow/podcast.old # get the new file wget -c $site # make the currentfile variable the result of the command currentfile=`grep -m1 audio/mpeg '/home/USERNAME/scripts/democracynow/podcast.xml' | cut -f6 -d '"'` #read the last file name back into the script and #put it all together for possible downloading. lastdownloaded=`tail -1 /home/USERNAME/scripts/democracynow/filelist.txt` #Display last downloaded file echo $lastdownloaded #Display current mp3 file name echo $currentfile #Compare the 2 variables if they are the same exit if [ "$currentfile" = "$lastdownloaded" ]; then echo "already downloaded file" else echo "looks like we are downloading" # Extract the name of the currentfile of Democracy Now show radio and sent to the end of filelist.txt echo $currentfile >> /home/USERNAME/scripts/democracynow/filelist.txt #Do the 27 meg new file download wget -c $currentfile #move the newly downloaded mp3 file to the Democracy Now radio dropbox mv /home/USERNAME/scripts/democracynow/*.mp3 /home/USERNAME/dropboxes/democracynow/ fi echo "done" On Sun, Apr 15, 2012 at 2:01 PM, Geoff Barkman <[email protected]> wrote: > I've had problems with democracy now too. The prob with the rss feed is not > only do they put the complete 59 min show but they put a few select > interviews from the show. It downloaded everything into a dropbox deleting > yesterdays show and i ended up having just one of the 5 min interviews being > the one going on air. > I solved it by making my owm script that downloads the rss page and finds > mp3 link and compairs it to yesterdays url. If they are the same it exits, > otherwise it down loads and copys to a dropbox. > I can send the script tomorrow if amyone is interested. > Cheers > Geoff > > On Apr 15, 2012 7:23 AM, <[email protected]> wrote: >> >> Hi, >> >> I did something similar a while ago to download Democracy Now (which >> also has some of the same download issues - goes through a redirect - as >> explained below). I did pretty much the same thing, but using wget. >> >> Also I didn't get fancy with anything like a 0.8 second cart or anything >> like that - I've just got a Macro in Rivendell which runs through >> RDCatch, which in turn calls a script that downloads via wget and then >> does the rdimport. >> >> Since redirects are coming more common, I wonder if the ability to >> follow such redirects can be added into RDCatch (this is presuming it >> isn't already there - as with others I was unable to make this type of >> thing work straight through RDCatch with Democracy Now). >> >> >> >> >> > We have a similar situation with Pacifica's Free Speech Radio News >> > (FSRN). >> > Their downloadable file is available at 4pm-ish CST, and we play it at >> > 5pm >> > CST. They post their downloadable file with a different URL based upon >> > the >> > current day's date, which confounds RDCatch. We wrote a shell script to >> > do >> > what we need. >> > >> > N.B. I have not plumbed the depths of RDCatch, so we may indeed have >> > duplicated something that RDCatch can already do with aplomb, yet >> > remains >> > beyond our current grasp of it. >> > >> > Our shell script properly formats the download URL to include the >> > current >> > date, then downloads it with curl and RDImports it into the cart. >> >> >> >> _______________________________________________ >> Rivendell-dev mailing list >> [email protected] >> http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev _______________________________________________ Rivendell-dev mailing list [email protected] http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev
