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

captora

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

captora

JavaScript library for Captora's API (node)

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-captora

JavaScript library for Captora's API (node)

This library supports downloading Captora CDM widgets as HTML fragments for inclusion on other pages.

Install

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.

Usage

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);
    
    });

Usage with a Proxy

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/

Change log

v1.1.0 — February 13, 2017

  • added support HTTP(S) proxy

v1.0.0 — February 6, 2017

  • Initial version
  • supports downloading Captora CDM widget HTML

License

node-captora is available under the MIT License.

Keywords

FAQs

Package last updated on 14 Feb 2017

Did you know?

Socket

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.

Install

Related posts

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