diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-03-21 12:11:53 +0100 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-03-21 12:11:53 +0100 |
commit | 4ea8ddfd4d89ca96e81ddf07ec3c7d0abfc8de70 (patch) | |
tree | 2cb252393056a143fbcc62bae0d5a3b9781ea213 /src | |
parent | 92bde78ea49d199d7189ad16622cc9a830d1feff (diff) |
livestreamer.plugins.ownedtv: Use two regexes.
It seems both regexes are needed for different URLs.
Should now work on both /live/id and /channelname URLs.
Diffstat (limited to 'src')
-rw-r--r-- | src/livestreamer/plugins/ownedtv.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/livestreamer/plugins/ownedtv.py b/src/livestreamer/plugins/ownedtv.py index 4ddeb2f..87df3ad 100644 --- a/src/livestreamer/plugins/ownedtv.py +++ b/src/livestreamer/plugins/ownedtv.py @@ -37,6 +37,10 @@ class OwnedTV(Plugin): data = fd.read() fd.close() + match = re.search(b"document.location.hash='/live/(\d+)'", data) + if match: + return int(match.group(1)) + match = re.search(b"xajax_load_live_config\((\d+),", data) if match: return int(match.group(1)) |