Skip to content

Commit 95fa3c2

Browse files
committed
docs: README
1 parent 8d8786b commit 95fa3c2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ 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 AI obtain the url of img and remove duplicates
67+
// Let the AI get the image link and de-duplicate it (the more detailed the description, the better)
6868
const srcResult = await crawlOpenAIApp.parseElements(
6969
highlyHTML,
70-
'Get the url of img and remove duplicates'
70+
`Get the image link, don't source it inside, and de-duplicate it`
7171
)
7272

7373
browser.close()
@@ -80,15 +80,21 @@ crawlApp.crawlPage('https://www.airbnb.cn/s/select_homes').then(async (res) => {
8080
})
8181
```
8282

83-
**You can even pass the entire HTML to AI to help us operate it. Since the website content is more complex, you also need to describe the location to be taken more accurately. The most important thing is that it will consume more Tokens.**
83+
**You can even send the whole HTML to the AI to help us operate, because the website content is more complex you also need to describe the location to get more accurately, and will consume a lot of Tokens.**
84+
85+
Procedure:
86+
87+
![](https://raw.githubusercontent.com/coder-hxl/x-crawl/main/assets/example.gif)
8488

8589
Pictures of highly rated vacation rentals climbed to:
8690

8791
![](https://raw.githubusercontent.com/coder-hxl/x-crawl/main/assets/example.png)
8892

8993
**Want to know more?**
9094

91-
https://coder-hxl.github.io/x-crawl/guide/#example
95+
For example: View the HTML that AI needs to process or view the srcResult (img url) returned by AI after parsing the HTML according to our instructions
96+
97+
All at the bottom of this example: https://coder-hxl.github.io/x-crawl/guide/#example
9298

9399
**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.
94100

0 commit comments

Comments
 (0)