Streamripper script for timed recording

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

Post Reply
User avatar
Patrick
Site Admin
Posts: 2519
Joined: Tue Apr 27, 2004 11:38 am
Location: Easton, PA
Contact:

Streamripper script for timed recording

Post by Patrick » Fri May 28, 2004 9:44 am

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
Ego contemno licentia

pthread
Posts: 57
Joined: Wed May 05, 2004 12:53 am
Contact:

Post by pthread » Fri May 28, 2004 2:34 pm

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.

User avatar
Patrick
Site Admin
Posts: 2519
Joined: Tue Apr 27, 2004 11:38 am
Location: Easton, PA
Contact:

Post by Patrick » Sat May 29, 2004 9:50 pm

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.
Ego contemno licentia

Post Reply