Added length check and new station
Added length check to support streams with empty lines (e.g. http://www.radioeins.de/live.m3u) Added RadioEins to stations.
This commit is contained in:
parent
aad7f5637c
commit
abb8c47dfc
2 changed files with 2 additions and 1 deletions
|
@ -108,7 +108,7 @@ def record(args):
|
|||
verboseprint('Seems to be an M3U playlist. Trying to parse...')
|
||||
with urllib.request.urlopen(streamurl) as remotefile:
|
||||
for line in remotefile:
|
||||
if not line.decode('utf-8').startswith('#'):
|
||||
if not line.decode('utf-8').startswith('#') and len(line) > 1:
|
||||
tmpstr = line.decode('utf-8')
|
||||
break
|
||||
streamurl = tmpstr
|
||||
|
|
|
@ -8,5 +8,6 @@ dlf = http://www.deutschlandradio.de/streaming/dlf.m3u
|
|||
dwissen = http://dradio_mp3_dwissen_m.akacast.akamaistream.net/7/728/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dwissen_m
|
||||
erfplus = http://c14000-l.i.core.cdn.streamfarm.net/14000cina/live/3212erf_96/live_de_96.mp3
|
||||
mdrklassik = http://avw.mdr.de/livestreams/mdr_klassik_live_128.m3u
|
||||
radioeins = http://www.radioeins.de/live.m3u
|
||||
swr2 = http://mp3-live.swr.de/swr2_m.m3u
|
||||
wdr3 = http://www.wdr.de/wdrlive/media/mp3/wdr3_hq.m3u
|
||||
|
|
Loading…
Reference in a new issue