From 43c04d48072fbee39c94ff41ed6e344f330f0a8b Mon Sep 17 00:00:00 2001 From: Timmy Larsson Date: Tue, 9 Jan 2018 21:09:39 +0100 Subject: [PATCH] Update livecodingtv.py Tried running livestreamer and got this error: ``` Failed to load plugin livecodingtv: File "/usr/lib/python3.6/imp.py", line 234, in load_module return load_source(name, filename, file) File "/usr/lib/python3.6/imp.py", line 172, in load_source module = _load(spec) File "", line 675, in _load File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "/usr/lib/python3.6/site-packages/livestreamer/plugins/livecodingtv.py", line 9, in _url_re = re.compile("http(s)?://(?:\w+.)?\livecoding\.tv") File "/usr/lib/python3.6/re.py", line 233, in compile return _compile(pattern, flags) File "/usr/lib/python3.6/re.py", line 301, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.6/sre_compile.py", line 562, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.6/sre_parse.py", line 855, in parse p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.6/sre_parse.py", line 416, in _parse_sub not nested and not items)) File "/usr/lib/python3.6/sre_parse.py", line 502, in _parse code = _escape(source, this, state) File "/usr/lib/python3.6/sre_parse.py", line 401, in _escape raise source.error("bad escape %s" % escape, len(escape)) sre_constants.error: bad escape \l at position 20 ``` This patch solves the issue, though I'm not sure why there would be a backslash initially. --- src/livestreamer/plugins/livecodingtv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/livestreamer/plugins/livecodingtv.py b/src/livestreamer/plugins/livecodingtv.py index 03a5d5ca..b91b30d6 100644 --- a/src/livestreamer/plugins/livecodingtv.py +++ b/src/livestreamer/plugins/livecodingtv.py @@ -6,7 +6,7 @@ _rtmp_re = re.compile('rtmp://[^"]+/(?P\w+)+[^/"]+') -_url_re = re.compile("http(s)?://(?:\w+.)?\livecoding\.tv") +_url_re = re.compile("http(s)?://(?:\w+.)?livecoding\.tv") class LivecodingTV(Plugin):