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 1.1.0-alpha.1 to 1.1.0-alpha.3

13

fetchers/index.js

@@ -9,5 +9,14 @@ "use strict";

const vars_1 = require("../vars");
const USER_AGENTS = [
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1',
'Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36',
'Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36'
];
const headers = {
'User-Agent': USER_AGENTS[Math.floor(Math.random() * USER_AGENTS.length)]
};
const fetchUserRatings = async (user, page) => {
const url = vars_1.userRatingsUrl(user, page);
const response = await cross_fetch_1.default(url);
const response = await cross_fetch_1.default(url, { headers });
return await response.text();

@@ -18,5 +27,5 @@ };

const url = vars_1.movieUrl(+movieId);
const response = await cross_fetch_1.default(url);
const response = await cross_fetch_1.default(url, { headers });
return await response.text();
};
exports.fetchMovie = fetchMovie;

2

package.json
{
"name": "node-csfd-api",
"version": "1.1.0-alpha.1",
"version": "1.1.0-alpha.3",
"description": "Simple NPM library for scraping CSFD",

@@ -5,0 +5,0 @@ "main": "./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