Comparing version 10.0.0 to 10.0.1
@@ -1,1 +0,1 @@ | ||
export * from './dist/x-crawl' | ||
export * from './dist/x-crawl.js' |
{ | ||
"name": "x-crawl", | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"author": "coderHXL", | ||
@@ -5,0 +5,0 @@ "description": "x-crawl is a flexible Node.js AI-assisted crawler library.", |
@@ -29,2 +29,12 @@ # x-crawl · [![npm](https://img.shields.io/npm/v/x-crawl.svg)](https://www.npmjs.com/package/x-crawl) [![NPM Downloads](https://img.shields.io/npm/dt/x-crawl)](https://www.npmjs.com/package/x-crawl) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/coder-hxl/x-crawl/blob/main/LICENSE) | ||
## AI assisted crawler | ||
With the rapid development of network technology, website updates have become more frequent, and changes in class names or structures often bring considerable challenges to crawlers that rely on these elements. Against this background, crawlers combined with AI technology have become a powerful weapon to meet this challenge. | ||
First of all, changes in class names or structures after website updates may cause traditional crawler strategies to fail. This is because crawlers often rely on fixed class names or structures to locate and extract the required information. Once these elements change, the crawler may not be able to accurately find the required data, thus affecting the effectiveness and accuracy of data crawling. | ||
However, crawlers combined with AI technology are better able to cope with this change. AI can also understand and parse the semantic information of web pages through natural language processing and other technologies to more accurately extract the required data. | ||
To sum up, crawlers combined with AI technology can better cope with the problem of class name or structure changes after website updates. | ||
## Example | ||
@@ -58,6 +68,6 @@ | ||
// Let AI obtain the url of img and remove duplicates | ||
// Let the AI get the image link and de-duplicate it (the more detailed the description, the better) | ||
const srcResult = await crawlOpenAIApp.parseElements( | ||
highlyHTML, | ||
'Get the url of img and remove duplicates' | ||
`Get the image link, don't source it inside, and de-duplicate it` | ||
) | ||
@@ -75,2 +85,8 @@ | ||
**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.** | ||
Procedure: | ||
![](https://raw.githubusercontent.com/coder-hxl/x-crawl/main/assets/example.gif) | ||
Pictures of highly rated vacation rentals climbed to: | ||
@@ -82,4 +98,6 @@ | ||
https://coder-hxl.github.io/x-crawl/guide/#example | ||
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 | ||
All at the bottom of this example: https://coder-hxl.github.io/x-crawl/guide/#example | ||
**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. | ||
@@ -86,0 +104,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
111279
110
1