Socket
Socket
Sign inDemoInstall

@web-master/node-web-crawler

Package Overview
Dependencies
74
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.6.0

dist/packages/node-web-crawler/lib/index.d.ts

26

dist/interfaces/index.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc