From 2ecf53bd9375938471a1400288375681f859f4e8 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Thu, 14 Mar 2013 22:43:32 +0100 Subject: [PATCH] kanal5: forgot import cookie modules --- lib/svtplay/service/kanal5.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/svtplay/service/kanal5.py b/lib/svtplay/service/kanal5.py index e750b2b..de86d4b 100644 --- a/lib/svtplay/service/kanal5.py +++ b/lib/svtplay/service/kanal5.py @@ -5,6 +5,11 @@ import sys import re import json +if sys.version_info > (3, 0): + from http.cookiejar import CookieJar, Cookie +else: + from cookielib import CookieJar, Cookie + from svtplay.utils import get_http_data, select_quality from svtplay.log import log from svtplay.fetcher.rtmp import download_rtmp @@ -14,6 +19,7 @@ class Kanal5(): return ("kanal5play.se" in url) or ('kanal9play.se' in url) def get(self, options, url): + cj = CookieJar() match = re.search(".*video/([0-9]+)", url) if not match: log.error("Can't find video file")