Page 1 of 1

Streamripper script for timed recording

Posted: Fri May 28, 2004 9:44 am
by Patrick
I started playing with streamripper on the recomendation of Linc & Allan and it works pretty well. There's a certain show I've discoverd that broadcasts from 1:00-5:00 AM every night. I'd like to record the show so I can listen to it at work during the day. I need to code a bash script & cron job to the following:
- connect to the internet via my 1 cable modem by opening a web browser (lynx?) and starting the dialup. I need to click the 'connect' button on the modems html control page. I can't startup the cable modem manually and just leave it on since it will drop after 20 minutes of inactivity (thanks Service Electric!)
- start to record the broadcast and continue for 4 hours. I know the streamripper syntax for this
- hangup the modem and shutdown

I'm a little weak on my bash scripting and cron job setups :)
Any tips? Thanks

Posted: Fri May 28, 2004 2:34 pm
by pthread
Well as a start, you need to figure out what the action is that the submit button has (i.e. the url it passes). Unfortunately, if the modem has any real type of security, this could get REALLY complicated, as it should be. I imagine there is a username and password for the modem?

That is an awfully odd set up, I love cable, but i would be looking at DSL if thats how your service works.

Posted: Sat May 29, 2004 9:50 pm
by Patrick
Here's the script with the help of Linc:
#!/bin/bash
curl -d "INPUT_BUTTON=Dial Modem&press=%20SUBMIT%20" 192.168.100.1/phonedata.html
sleep 30
streamripper http://69.28.144.51:12025 -l 14400
curl -d "INPUT_BUTTON=Hang Up Modem&press=%20SUBMIT%20" 192.168.100.1/phonedata.html
kill $PPID

I setup a CRON job to do this 3 minutes before the show starts.
pthread wrote: That is an awfully odd set up, I love cable, but i would be looking at DSL if thats how your service works.
I would prefer a DSL line as well but it's not currently available in my neighborhood yet :( So I put up with the one way cable modem.