修改模块

This commit is contained in:
2025-12-10 17:19:01 +08:00
parent 620975c04d
commit 640ec71c74
9 changed files with 1403 additions and 1936 deletions

34
datav/test_api.js Normal file
View File

@@ -0,0 +1,34 @@
const https = require('https');
const options = {
hostname: 'ad.yunmainiu.com',
port: 443,
path: '/api/cattle-data',
method: 'GET',
headers: {
'Host': 'ad.yunmainiu.com',
'Referer': 'https://ad.yunmainiu.com/',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
}
};
const req = https.request(options, (res) => {
console.log('StatusCode:', res.statusCode);
console.log('Headers:', res.headers);
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('Body Length:', data.length);
console.log('Body Preview:', data.substring(0, 500));
});
});
req.on('error', (e) => {
console.error(e);
});
req.end();