Skip to content

Commit

Permalink
init setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchTaqi committed Jul 19, 2017
1 parent 7514993 commit c342e44
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions radiorec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import requests

stream_url = 'http://audio.samaafm.com:8008/1'

r = requests.get(stream_url, stream=True)

with open('stream.mp3', 'wb') as f:
try:
for block in r.iter_content(1024):
f.write(block)
except KeyboardInterrupt:
pass
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
certifi==2017.4.17
chardet==3.0.4
fudge==1.1.0
idna==2.5
requests==2.18.1
simplejson==3.11.1
soundcloud==0.5.0
urllib3==1.21.1

0 comments on commit c342e44

Please sign in to comment.