Merge pull request #5 from SeBaBu/add-empty-line-check-m3u
Added length check and new station
This commit is contained in:
commit
d8113b9cc9
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...')
|
verboseprint('Seems to be an M3U playlist. Trying to parse...')
|
||||||
with urllib.request.urlopen(streamurl) as remotefile:
|
with urllib.request.urlopen(streamurl) as remotefile:
|
||||||
for line in 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')
|
tmpstr = line.decode('utf-8')
|
||||||
break
|
break
|
||||||
streamurl = tmpstr
|
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
|
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
|
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
|
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
|
swr2 = http://mp3-live.swr.de/swr2_m.m3u
|
||||||
wdr3 = http://www.wdr.de/wdrlive/media/mp3/wdr3_hq.m3u
|
wdr3 = http://www.wdr.de/wdrlive/media/mp3/wdr3_hq.m3u
|
||||||
|
|
Loading…
Reference in a new issue