@web-master/node-web-crawler
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -1,2 +0,1 @@ | ||
import { ScrapeOptions } from '@web-master/node-web-scraper'; | ||
interface UrlObject { | ||
@@ -8,9 +7,24 @@ url: string; | ||
} | ||
interface ScrapeConfig { | ||
target: string; | ||
waitFor?: number; | ||
fetch: ScrapeOptions; | ||
} | ||
interface ScrapeOptions { | ||
[key: string]: string | ScrapeOptionElement | ScrapeOptionList; | ||
} | ||
interface ScrapeOptionElement { | ||
selector?: string; | ||
attr?: string; | ||
convert?: (value: any) => any; | ||
} | ||
interface ScrapeOptionList { | ||
listItem: string; | ||
data?: ScrapeOptions; | ||
} | ||
interface CrawlConfig { | ||
target: string[] | CrawlLinkOptions; | ||
fetch: (data?: any, index?: number) => ScrapeOptions; | ||
waitFor?: number; | ||
fetch: (data: any, index: number, url: string) => ScrapeOptions; | ||
} | ||
interface CrawlConfigPuppeteer extends CrawlConfig { | ||
waitFor: number; | ||
} | ||
interface CrawlLinkOptions { | ||
@@ -24,2 +38,2 @@ url: string; | ||
} | ||
export { UrlObject, UrlHolder, CrawlConfig, CrawlConfigPuppeteer, CrawlLinkOptions, }; | ||
export { UrlHolder, ScrapeConfig, ScrapeOptions, ScrapeOptionElement, ScrapeOptionList, CrawlConfig, CrawlLinkOptions, }; |
@@ -0,13 +1,11 @@ | ||
import crawl from './dist/packages/node-web-crawler/lib/index'; | ||
import { | ||
crawl, | ||
CrawlConfig, | ||
CrawlConfigPuppeteer, | ||
CrawlLinkOptions, | ||
} from './dist'; | ||
} from './dist/interfaces'; | ||
export default crawl; | ||
export { | ||
crawl, | ||
CrawlConfig, | ||
CrawlConfigPuppeteer, | ||
CrawlLinkOptions, | ||
}; | ||
export default crawl; |
@@ -1,4 +0,3 @@ | ||
const crawl = require('./dist').default; | ||
const crawl = require('./dist/packages/node-web-crawler/lib/index').default; | ||
module.exports = crawl; | ||
module.exports.crawl = crawl; | ||
module.exports.default = crawl; |
{ | ||
"name": "@web-master/node-web-crawler", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Crawl web as easy as possible", | ||
@@ -36,3 +36,3 @@ "repository": "git@github.com:saltyshiomix/web-master.git", | ||
"dependencies": { | ||
"@web-master/node-web-scraper": "^0.5.0" | ||
"@web-master/node-web-scraper": "^0.6.0" | ||
}, | ||
@@ -55,3 +55,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "3330c23e8934e241f32c906c9b94d26a12500b18" | ||
"gitHead": "64ac532f6540e725645230725a5ed61a4ddc141a" | ||
} |
@@ -40,3 +40,3 @@ <p align="center">😎 @web-master/node-web-crawler 😎</p> | ||
fetch: () => ({ | ||
title: '.title', | ||
title: '[class="title"] > a', | ||
}), | ||
@@ -71,3 +71,3 @@ }); | ||
fetch: () => ({ | ||
title: '.title', | ||
title: '[class="title"] > a', | ||
}), | ||
@@ -104,3 +104,3 @@ }); | ||
fetch: () => ({ | ||
title: '.title', | ||
title: '[class="title"] > a', | ||
}), | ||
@@ -107,0 +107,0 @@ }); |
Sorry, the diff of this file is not supported yet
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
14665
14
161
5
+ Added@web-master/node-web-scraper@0.6.1(transitive)
- Removed@web-master/node-web-scraper@0.5.0(transitive)