1
winnerczwx 2022-06-08 13:47:56 +08:00
|
2
ShayneWang 2022-06-08 14:47:38 +08:00
puppeteer
|
3
duan602728596 2022-06-08 19:04:52 +08:00
import fs from 'node:fs/promises';
import got from 'got'; import needle from 'needle'; const res = await got('https://opensea.io/', { responseType: 'text' }); await fs.writeFile('1.html', res.body); needle.get('https://opensea.io/', function(error, res) { if (!error && res.statusCode === 200) fs.writeFile('2.html', res.body); }); 测了下没问题,应该没有反爬。有可能是网络问题,毕竟服务器在境外。 |
4
roiding OP @duan602728596 手动给你点个赞
|