Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-csfd-api

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-csfd-api - npm Package Compare versions

Comparing version 3.0.0-next.3 to 3.0.0-next.4

7

cjs/fetchers/index.js
"use strict";
// import fetch from 'cross-fetch';
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -11,8 +12,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchPage = void 0;
const cross_fetch_1 = __importDefault(require("cross-fetch"));
const USER_AGENTS = [

@@ -29,3 +26,3 @@ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',

try {
const response = yield (0, cross_fetch_1.default)(url, { headers });
const response = yield fetch(url, { headers });
if (response.status >= 400 && response.status < 600) {

@@ -32,0 +29,0 @@ throw new Error(`node-csfd-api: Bad response ${response.status} for url: ${url}`);

@@ -0,1 +1,2 @@

// import fetch from 'cross-fetch';
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -10,3 +11,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

};
import fetch from 'cross-fetch';
const USER_AGENTS = [

@@ -13,0 +13,0 @@ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',

{
"name": "node-csfd-api",
"version": "3.0.0-next.3",
"version": "3.0.0-next.4",
"description": "ČSFD API in JavaScript. Amazing NPM library for scrapping csfd.cz :)",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc