Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
JavaScript library for Captora's API (node)
This library supports downloading Captora CDM widgets as HTML fragments for inclusion on other pages.
Available on NPM.
npm install captora
Additionally, this library requires that the CAPTORA_API_KEY
and the CAPTORA_DOMAIN
variables are present in the environment.
This library can be used with Promises/A+ or with node-style callbacks.
const captora = require("captora");
// the URL of the page where the CDM widget HTML will be included
let url = "https://www.example.com/";
// Promise based
captora.widget.download(url)
.then(html => console.log(html))
.catch(console.error);
// error-first, node-style callback
captora.widget.download(url, function (err, html) {
if (err) {
throw err;
}
console.log(html);
});
To proxy HTTP(S) requests, then set the appropriate npm config variables.
npm config set https-proxy http://proxy.example.com:3128/
npm config set proxy http://proxy.example.com:3128/
If the npm config variables are not found, then these environment variables will be used.
HTTPS_PROXY=http://proxy.example.com:3128/
HTTP_PROXY=http://proxy.example.com:3128/
v1.1.0 — February 13, 2017
v1.0.0 — February 6, 2017
node-captora is available under the MIT License.
FAQs
JavaScript library for Captora's API (node)
We found that captora demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.