No mor open with, plain fileobject
This commit is contained in:
parent
a8ad2c03e7
commit
b4988e7299
1 changed files with 4 additions and 2 deletions
|
@ -124,8 +124,10 @@ def record(args):
|
||||||
verboseprint('Seems to be an M3U playlist. Trying to parse...')
|
verboseprint('Seems to be an M3U playlist. Trying to parse...')
|
||||||
pool = urllib3.PoolManager()
|
pool = urllib3.PoolManager()
|
||||||
remotefile = pool.request('GET', streamurl)
|
remotefile = pool.request('GET', streamurl)
|
||||||
if not remotefile.data.decode('utf-8').startswith('#') and len(remotefile.data) > 1:
|
for line in remotefile.data.decode().split():
|
||||||
tmpstr = remotefile.data.decode('utf-8')
|
if not line.startswith('#') and len(line) > 1:
|
||||||
|
tmpstr = line
|
||||||
|
break
|
||||||
streamurl = tmpstr
|
streamurl = tmpstr
|
||||||
|
|
||||||
verboseprint(print_time() + " ... Stream URL: " + streamurl)
|
verboseprint(print_time() + " ... Stream URL: " + streamurl)
|
||||||
|
|
Loading…
Reference in a new issue