i need wget for windows to download and parse an xml file IE: extract the url for the latest mp3 file at Democracy now [for example] RSS feed and download it to a directory on my PC for later playout in automation.
the DN feed is dynamic [as with most promgramming sources] with the url chaning for each new edition but being contained in the RSS XML and i need it to download and change [rename] to a static name for the automation playout.
i had this working and then something happened and it quit working.
i have been for months trying to get it to work again with no luck.
You're going to need more than wget for that.
wget can download both the xml file and the audio file in the enclosure, but you're going to need something to parse the XML output to find the appropriate info. While you might skirt by using the mirroring bits of wget, if there's some src URI before the audio enclosure, you're probably going to end up with that rather than the (presumably) MP3 file you're looking for.
And this is where my helpfulness kind of ends, as my next step would be to do it with some scripting. I'd use perl or php because they've got straightforward xml parsing capabilities, that way I can avoid edge cases of rss feeds without too much worry. That said, I've seen people do it using bash, sed, and awk.
Note that all of these are unix utils. I've heard perl and php can run on windows, but I've not experience with that.
Oddly enough, I'm working on doing XML parsing this week for an unrelated project.
I was thinking of a URL you could send an RSS feed to, and it would send you the most recent episode off the podcast in return. Probably host it myself as I end up needing something like this every once in a while, but I'd also probably post the code somewhere so it was generally available.
Does that suit?
i'd give it a try
I wrote a simple C program to parse the BC Ferries web page (when I was issuing ferry reports on Bowen Island), and then generate text that I would convert into speech using TTS. If you're at all familiar with programming, it gives you the most flexibility.
to figure out this Democracy Now problem. asked the question over at stack overflow, no response yet. it's been a day as of this post.
wget -O DemocracyNow.mp3 --no-check-certificate https://traffic.libsyn.com/democracynow/dn%Date:~10,4%-%Date:~4,2%%Date:~7,2%-1.mp3
save as a batch file, execute from windows task scheduler 🙂
enjoy.
was given to me by a party in an engineering group on facebook.
https://gist.github.com/refutationalist/0fd8d056de3d9c9a410a5a87a78b7779
Alright. You *can* install PHP on windows and (I'm pretty sure) use this as a command line script. Instructions on how to use it are in the comments.
I'd make more windows-specific noises, but I'm *really* not a windows guy. I think I've got a window tablet somewhere, but I only got it to test websites I work on.
