瀏覽代碼

[openload] Fix _load_cookies for python 2.6

Sergey M․ 8 年之前
父節點
當前提交
011da618bd
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      youtube_dl/extractor/openload.py

+ 5 - 2
youtube_dl/extractor/openload.py

@@ -8,7 +8,10 @@ import subprocess
 import tempfile
 import tempfile
 
 
 from .common import InfoExtractor
 from .common import InfoExtractor
-from ..compat import compat_urlparse
+from ..compat import (
+    compat_urlparse,
+    compat_kwargs,
+)
 from ..utils import (
 from ..utils import (
     check_executable,
     check_executable,
     determine_ext,
     determine_ext,
@@ -158,7 +161,7 @@ class PhantomJSwrapper(object):
                 cookie['rest'] = {'httpOnly': None}
                 cookie['rest'] = {'httpOnly': None}
             if 'expiry' in cookie:
             if 'expiry' in cookie:
                 cookie['expire_time'] = cookie['expiry']
                 cookie['expire_time'] = cookie['expiry']
-            self.extractor._set_cookie(**cookie)
+            self.extractor._set_cookie(**compat_kwargs(cookie))
 
 
     def get(self, url, html=None, video_id=None, note=None, note2='Executing JS on webpage', headers={}, jscode='saveAndExit();'):
     def get(self, url, html=None, video_id=None, note=None, note2='Executing JS on webpage', headers={}, jscode='saveAndExit();'):
         """
         """