Skip to content

Commit a55851c

Browse files
authored
docs: modify warning
1 parent d1f1d27 commit a55851c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ The combination of crawler and AI allows the crawler and AI to obtain pictures o
4343
```js
4444
import { createCrawl, createCrawlOpenAI } from 'x-crawl'
4545

46-
//Create a crawler application
46+
// Create a crawler application
4747
const crawlApp = createCrawl({
4848
maxRetry: 3,
4949
intervalTime: { max: 2000, min: 1000 }
5050
})
5151

52-
//Create AI application
52+
// Create AI application
5353
const crawlOpenAIApp = createCrawlOpenAI({
5454
clientOptions: { apiKey: process.env['OPENAI_API_KEY'] },
5555
defaultModel: { chatModel: 'gpt-4-turbo-preview' }
@@ -64,7 +64,7 @@ crawlApp.crawlPage('https://www.airbnb.cn/s/select_homes').then(async (res) => {
6464
await page.waitForSelector(targetSelector)
6565
const highlyHTML = await page.$eval(targetSelector, (el) => el.innerHTML)
6666

67-
// Let the AI get the image link and de-duplicate it (the more detailed the description, the better)
67+
// Let AI obtain image links and remove duplicates
6868
const srcResult = await crawlOpenAIApp.parseElements(
6969
highlyHTML,
7070
`Get the image link, don't source it inside, and de-duplicate it`
@@ -1357,7 +1357,8 @@ For ease of viewing, it is formatted here
13571357

13581358
</details>
13591359

1360-
**warning**: x-crawl is for legal use only. Any illegal activity using this tool is prohibited. Please be sure to comply with the robots.txt file regulations of the target website. This example is only used to demonstrate the use of x-crawl and is not targeted at a specific website.
1360+
> [!WARNING]
1361+
> x-crawl is for legal use only. Any illegal activity using this tool is prohibited. Please be sure to comply with the robots.txt file regulations of the target website. This example is only used to demonstrate the use of x-crawl and is not targeted at a specific website.
13611362
13621363
## Getting Started
13631364

0 commit comments

Comments
 (0)