Socket
Socket
Sign inDemoInstall

cartoon-catch

Package Overview
Dependencies
21
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.5 to 2.1.6

10

dist/main.js

@@ -22,3 +22,3 @@ "use strict";

const grap = (pageUrl, options, transform) => __awaiter(void 0, void 0, void 0, function* () {
const { target, slice = [], urlReplace = [], titleReplace = [], host = helper_1.getHost(pageUrl) } = options;
const { target, slice = [], urlReplace = [], titleReplace = [/[\/\\\|\<\>\*\:\?\"]/, '-'], host = helper_1.getHost(pageUrl) } = options;
// const urlReplace: [any?, any?] = options.urlReplace || [];

@@ -40,3 +40,3 @@ if (!target)

}
let title = $(item).text().trim().replace(...titleReplace);
let title = $(item).text().trim().replace(titleReplace[0], titleReplace[1]);
return [url, title];

@@ -49,3 +49,3 @@ });

const downloadImages = (urls, options, transform) => __awaiter(void 0, void 0, void 0, function* () {
const { beforeFunction, headers = {}, imageHost = '', name, extract, downloadOptions = {} } = options;
const { beforeFunction, imageHost = '', name, extract, downloadOptions = {} } = options;
for (const item of urls) {

@@ -64,5 +64,3 @@ let url, title, result;

log('发起请求', url);
result = yield helper_1.getHtml(url, {
headers
})
result = yield helper_1.getHtml(url, options)
.catch(e => {

@@ -69,0 +67,0 @@ error('请求超时', url, e);

2

package.json
{
"name": "cartoon-catch",
"version": "2.1.5",
"version": "2.1.6",
"description": "cartoon-catch",

@@ -5,0 +5,0 @@ "main": "dist/main.js",

@@ -16,3 +16,3 @@

urlReplace = [],
titleReplace = [],
titleReplace = [/[\/\\\|\<\>\*\:\?\"]/, '-'],
host = getHost(pageUrl)

@@ -34,3 +34,3 @@ } = options;

}
let title = $(item).text().trim().replace(...titleReplace);
let title = $(item).text().trim().replace(titleReplace[0], titleReplace[1]);
return [url, title];

@@ -46,3 +46,2 @@ });

beforeFunction,
headers = {},
imageHost = '',

@@ -65,5 +64,3 @@ name,

log('发起请求', url);
result = await getHtml(url, {
headers
})
result = await getHtml(url, options)
.catch(e => {

@@ -70,0 +67,0 @@ error('请求超时', url, e)

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc