aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
Diffstat (limited to 'youtube')
-rw-r--r--youtube/accounts.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/accounts.py b/youtube/accounts.py
index 6959fb2..7bb5ec5 100644
--- a/youtube/accounts.py
+++ b/youtube/accounts.py
@@ -37,10 +37,11 @@ def add_account(username, password, save):
return successful
def cookiejar_from_lwp_str(lwp_str):
+ lwp_str = "#LWP-Cookies-2.0\n" + lwp_str # header required by _really_load for reading from "file"
cookiejar = http.cookiejar.LWPCookieJar()
# HACK: cookiejar module insists on using filenames and reading files for you,
# so present a StringIO to this internal method which takes a filelike object
- cookiejar._really_load(self, io.StringIO(lwp_str), "", False, False)
+ cookiejar._really_load(io.StringIO(lwp_str), "", False, False)
return cookiejar
def account_cookiejar(username):