- AuthorPosts
- May 21, 2016 at 3:28 pm #10609
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.
May 22, 2016 at 7:09 pm #49155WaxyMouthfeel
Guest
Total posts : 45366You’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.
June 3, 2016 at 4:32 pm #49234WaxyMouthfeel
Guest
Total posts : 45366Oddly 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?
June 3, 2016 at 5:45 pm #49236Part 15 Engineer
Guest
Total posts : 45366i’d give it a try
June 3, 2016 at 6:09 pm #49237ArtisanRadio
Guest
Total posts : 45366I 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.
June 13, 2016 at 4:18 pm #49311Part 15 Engineer
Guest
Total posts : 45366to 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.
June 15, 2016 at 12:34 am #49329[code]wget -O DemocracyNow.mp3 –no-check-certificate https://traffic.libsyn.com/democracynow/dn%Date:~10,4%-%Date:~4,2%%Date:~7,2%-1.mp3%5B/code%5D
save as a batch file, execute from windows task scheduler 🙂
enjoy.
was given to me by a party in an engineering group on facebook.
June 15, 2016 at 2:16 am #49330Part 15 Engineer
Guest
Total posts : 45366see this url,,
June 15, 2016 at 11:59 pm #49342WaxyMouthfeel
Guest
Total posts : 45366https://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.
- AuthorPosts
- You must be logged in to reply to this topic.