1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

hls._get_tuple_attribute: in some cases there is a space in beginning of the name.

I saw this on some dplay live streams
This commit is contained in:
Johan Andersson 2018-01-09 13:59:12 +01:00
parent 1f8b7f793f
commit 699412dc09

View File

@ -387,7 +387,7 @@ def _get_tuple_attribute(attribute):
for art_l in re.split(''',(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', attribute):
if art_l:
name, value = art_l.split("=", 1)
name = name.strip()
# Checks for attribute name
if not re.match("^[A-Z0-9\-]*$", name):
raise ValueError("Not a valid attribute name.")