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

economist-audio-downloader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

economist-audio-downloader

A tool to download the audio edition of The Economist from the command line

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Economist Audio Downloader

A tool for downloading the audio edition of The Economist. Requires an active subscription to the publication.

NPM

Build Status

This package contains a command line tool economist-audio-downloader as well two classes which can be used to download the publication programmatically.

Install

Install with npm install. If you aren't going to run mocha tests you can run npm install --only=production to skip installing mocha.

Configuration

To see the available commands and arguments run economist-audio-downloader --help

The username and password of the economist.com account can be specified via the enviornment variables ECONOMIST_USERNAME and ECONOMIST_PASSWORD.

All arguments, including the account credentials can be stored in a json file

Example:

 {
     "username": "...",
     "password": "...",
     "proxy_url": "socks5://..."
 }

The configuration file can be referenced with the --config or -f argument (e.g. economist-audio-downloader -f config.json).

Example

Example: economist-audio-downloader download -u ... -p ... --output "~/latest-economist-issue.zip"

Programmatic access

This package can be used programmatically. See src/EconomistAudioDownloader.js and src/EconomistClient.js

Example:

    const { EconomistAudioDownloader, EconomistClient } = require('economist-audio-downloader');

    let ead = new EconomistAudioDownloader({ username: "...", password: "" });

    ead.download_audio_edition('latest', 'Introduction')
        .then((result) => {
            let out = result.zip.pipe(require('fs').createWriteStream("~/latest-economist-issue.zip"));

            out.on('finish', () => {
                console.log(`Downloaded: ${result.issue_date}`);
            });

            out.on('error', () => {
                ...
            })
        })
        .catch((err) => {
            ...
        });

Tests

Tests are written in mocha. Test with npm test.

FAQs

Package last updated on 13 Sep 2018

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