Fix slow (unbuffered) readline.
This commit is contained in:
parent
dc6a770b23
commit
33c9a20c34
@ -363,8 +363,11 @@ class CheckHls():
|
|||||||
segment_urls = []
|
segment_urls = []
|
||||||
total_duration = 0.0
|
total_duration = 0.0
|
||||||
metadata = {}
|
metadata = {}
|
||||||
for line in iter(res.readline, b""):
|
result = res.read().decode("utf-8")
|
||||||
line = line.decode("utf-8").strip()
|
for line in result.split("\n"):
|
||||||
|
line = line.strip()
|
||||||
|
if len(line) == 0:
|
||||||
|
continue
|
||||||
#print(line)
|
#print(line)
|
||||||
if line[0] == "#":
|
if line[0] == "#":
|
||||||
header, value = self.parse_metaline(line)
|
header, value = self.parse_metaline(line)
|
||||||
|
Reference in New Issue
Block a user