Now want to use python code to implement this process get cookies, use jsdom (s has a window in the code, document and other variables, involves to the window. The innerWidth, document. The body. The clientWidth, window. XDomainRequest, navigator, etc.)
import execjs
Js="'
Jsdom const jsdom=the require (" ");
Const {JSDOM}=JSDOM;
Const dom=new JSDOM (` & lt; ! DOCTYPE html>Hello world
`);
The window=dom. The window;
The document=window. The document;
XMLHttpRequest=window. The XMLHttpRequest;
The function getCookie () {
//output cookie js code A
Return the cookie;
}
} "'
P=execjs.com running (js, CWD=r './node_modules')
Print p.c all (' getCookie
Running can't obtain the result, the returned is None, whether is also the problem of the cross domain? Consult the what to do?