Commit b87a0a4e authored by wang's avatar wang

wn test

parent ccae1cd4
...@@ -140,10 +140,10 @@ while True: ...@@ -140,10 +140,10 @@ while True:
# token = '11' # token = '11'
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message'] # r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json() # r = requests.get('http://127.0.0.1:3001').json()
p = subprocess.Popen(['node', 'js_dom_run1.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'js_dom_run1.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run1.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE, p = subprocess.Popen(['node', 'src_run1.js', selectId, '11', token], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
output, err = p.communicate(timeout=10) output, err = p.communicate(timeout=10)
tmp = '' tmp = ''
......
This diff is collapsed.
...@@ -9,32 +9,70 @@ ...@@ -9,32 +9,70 @@
</body> </body>
</html> </html>
<script> <script>
Date.now = function now() { return 1693903208580 }; Date.now = function now() {
Date.parse = function () { return 1693903208580 }; return 1693903208580
Date.prototype.valueOf = function () { return 1693903208580 }; };
Date.prototype.getTime = function () { return 1693903208580 }; Date.parse = function () {
Date.prototype.toString = function () { return 1693903208580 }; return 1693903208580
Performance.prototype.now = function now(){ return Number('1693903208580'.slice(8))} };
Date.prototype.valueOf = function () {
return 1693903208580
};
Date.prototype.getTime = function () {
return 1693903208580
};
Date.prototype.toString = function () {
return 1693903208580
};
Performance.prototype.now = function now() {
return Number('1693903208580'.slice(8))
}
times = 0 times = 0
Math.random = function random() { return 0.08636862211354912 }; Math.random = function random() {
return 0.08636862211354912
};
_print = console.log _print = console.log
stackTrace = []; stackTrace = [];
con3 = function (){ con3 = function () {
if (window.debug1){ if (window.debug1) {
_print(...arguments) _print(...arguments)
} }
} }
con4 = function (){ con4 = function () {
if (window.debug1){ if (window.debug1) {
_print(...arguments) _print(...arguments)
} }
} }
idx = 0 idx = 0
addEventListener('DOMContentLoaded', function (e){ addEventListener('DOMContentLoaded', function (e) {
debugger; debugger;
console.log(e) console.log(e)
}) })
_join = Array.prototype.join;
Array.prototype.join = function (s) {
_print('join', this.length, this, s)
let res = _join.call(this, s)
_print('joinres', res)
return res;
}
_getOwnPropertyNames = Object.getOwnPropertyNames;
Object.getOwnPropertyNames = function (a) {
let res = _getOwnPropertyNames(a);
_print('getOwnPropertyNames', a, res)
return res;
}
var _hasOwnProperty = Object.hasOwnProperty;
Object.hasOwnProperty = function () {
let res = _hasOwnProperty.apply(this, arguments);
_print('Object.hasOwnProperty', arguments, res === undefined);
return res;
}
</script> </script>
<script src="src_out.js"></script> <script src="src_out.js"></script>
<!--<script src="env/get_pixels.js"></script>--> <!--<script src="env/get_pixels.js"></script>-->
...@@ -44,7 +82,8 @@ ...@@ -44,7 +82,8 @@
function sendXHr() { function sendXHr() {
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
let h = { "accept": "application/json", let h = {
"accept": "application/json",
"accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7", "accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
"api-version": "v3", "api-version": "v3",
"application-channel": "Desktop_Web", "application-channel": "Desktop_Web",
...@@ -57,9 +96,10 @@ ...@@ -57,9 +96,10 @@
for (let hKey in h) { for (let hKey in h) {
xhr.setRequestHeader(hKey, h[hKey]) xhr.setRequestHeader(hKey, h[hKey])
} }
try{ try {
xhr.send('{\"tripType\":\"oneWay\",\"from\":\"ZLA\",\"to\":\"NAS\",\"depart\":\"2023-05-11\",\"cabin\":\"economy\",\"refundable\":false,\"dates\":{\"before\":\"3\",\"after\":\"3\"},\"pax\":{\"ADT\":1,\"CHD\":0,\"INF\":0,\"UNN\":0},\"redempoint\":false,\"pointsBreakup\":{\"option\":\"\",\"value\":0},\"isMultiCity\":false}"'); xhr.send('{\"tripType\":\"oneWay\",\"from\":\"ZLA\",\"to\":\"NAS\",\"depart\":\"2023-05-11\",\"cabin\":\"economy\",\"refundable\":false,\"dates\":{\"before\":\"3\",\"after\":\"3\"},\"pax\":{\"ADT\":1,\"CHD\":0,\"INF\":0,\"UNN\":0},\"redempoint\":false,\"pointsBreakup\":{\"option\":\"\",\"value\":0},\"isMultiCity\":false}"');
}catch (e){} } catch (e) {
}
console.log(xhr.headers) console.log(xhr.headers)
return xhr.headers return xhr.headers
} }
...@@ -83,6 +123,7 @@ ...@@ -83,6 +123,7 @@
debugger debugger
try { try {
sendXHr() sendXHr()
}catch (e){} } catch (e) {
}
console.log('结束times', window.times) console.log('结束times', window.times)
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment