Replies: 1 comment 2 replies
-
是需要知道对应的 url 吗 const myXCrawl = xCrawl({ intervalTime: { max: 3000, min: 1000 } })
const config = [
{
url: 'https://test.com/a',
headers: { 'User-Agent': useUA() },
},
{
url: 'https://test.com/b',
headers: { 'User-Agent': useUA() },
},
]
const response = await myXCrawl.crawlHTML(config)
for await (const item of response) {
// 如何获请求的 url 呢?
const url = config[item.id - 1].url
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions