lizongze 2 年之前
父節點
當前提交
b7feb8120f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      FworkSpider/untils/jsl_clearance_s.py

+ 3 - 1
FworkSpider/untils/jsl_clearance_s.py

@@ -66,7 +66,9 @@ class DTCookiePool(PageCookiePool):
                                             contentType: "text/html",
                                         });
                     window = dom.window;
-                    document = window.document;''' + js_func
+                    document = window.document;
+                    location = window.location;
+                    ''' + js_func
         ctx = execjs.compile(js_func)
         # with open('ex_js.js', 'w+', encoding='utf-8') as f:
         #     f.write(js_func)