diff --git a/iqiyi/test.js b/iqiyi/test.js index ce616835e26e118ec44a86752698d9439474153f..783831a1559db07c6782c1ed8fa74e7baec21f8b 100644 --- a/iqiyi/test.js +++ b/iqiyi/test.js @@ -1,26 +1,25 @@ -// window = this; -// navigator = { -// appName: 'Netscape' -// }; -// localStorage = { -// getItem: function () { -// return null; -// } -// }; -// sessionStorage = { -// getItem: function () { -// return null; -// } -// }; -// -// document = { -// cookie: "" -// }; +const { JSDOM } = require("jsdom"); +const dom = new JSDOM("

hello word

", { + url: "http://www.iqiyi.com/", + referrer: "http://www.iqiyi.com/", + contentType: "text/html", + includeNodeLocations: true, + storageQuota: 1000000 +}); +global.window = dom.window; +global.document = window.document; +global.self = window; +document.domain = "iqiyi.com"; + const t = require('./webpack_out'); +delete process; +delete require; +// delete global; +module = undefined; -let dutO = t('dutO').a; -cons +let dutO = t('295'); +console.log(dutO.cmd5x("/dash/asd"));