npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lingua-com-fetcher

v1.0.0-rc.0

Published

Lessons fetcher for lingua.com

Downloads

4

Readme

Lingua.com Lessons Fetcher

npm

This repository contains a Selenium script that fetches lessons from the https://lingua.com/ website.

Specifically, it downloads:

  1. Lesson texts
  2. Lesson audio files
  3. Lesson PDFs (with exercises)

Lessons Access

Lignua.com provides free and premium content.

While the premium contains all lessons and audio, the free one is limited to a few lessons in each category, and mostly without audio.

The free content is also available anonymously without logging in.

This script can also act anonymously or with your account credentials. See Providing Credentials below for more info.

Install

$ npm i -g lingua-com-fetcher

To update to the latest version:

$ npm i -g lingua-com-fetcher@latest

Usage

List available languages:

$ lingua-com-fetcher ls

Fetching language list… ✓
Found 16 languages:
code: en, name: english
code: es, name: spanish
...

Download lessons for a language:

$ lingua-com-fetcher fetch <lang> <path>

For example, to fetch lessons for the Spanish language into outdir directory:

$ lingua-com-fetcher fetch es outdir

Fetching language list… ✓
Logging in as "username"… ✓
Discovering lessons for "Spanish"… ✓
Found sections:
  "Level A1" with 14 lessons
  "Level A2" with 30 lessons
  "Level B1" with 45 lessons
  "Level B2" with 23 lessons
Fetching lessons...
  Section: "Level A1"
    Lesson "01":        TXT ✓   PDF ✓   MP3 ✓
    Lesson "02":        TXT ✓   PDF ✓   MP3 ✓
...

Selective downloading

If you don't need to download everything, you can use --select option to choose what to fetch.

For example, this command:

$ lingua-com-fetcher fetch es outdir --select txt pdf

will skip MP3s and will only download texts and PDFs.

Providing Credentials

If you create a file called lingua-com-secret.json, it will be used to log you in:

{
  "username": "Your-Lingua-Com-Username",
  "password": "Your-Lingua-Com-Password"
}

If placed in the current directory, it will be read automatically. You can also provide its path via the --secret option:

$ lingua-com-fetcher --secret path/to/your/secret.json fetch businessenglish outdir

CLI reference

$ lingua-com-fetcher --help:

lingua-com-fetcher <command>

Commands:
  lingua-com-fetcher ls                   Lists available languages.
  lingua-com-fetcher fetch <lang> <path>  Fetches lessons for the <lang> into
                                          <path>.

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

$ lingua-com-fetcher fetch --help:

lingua-com-fetcher fetch <lang> <path>

Fetches lessons for the <lang> into <path>.

Positionals:
  lang  Lessons language. Can be either two-letter code or language name as it's
        shown by the `ls` command.                           [string] [required]
  path  Lessons output directory.                            [string] [required]

Options:
      --help     Show help                                             [boolean]
      --version  Show version number                                   [boolean]
      --select   Select what type of files to download. If omitted, then all
                 files.                   [array] [choices: "txt", "pdf", "mp3"]
  -s, --secret   Path to the file with your Lingua.com credentials.
                                    [string] [default: "lingua-com-secret.json"]
      --dryRun   Don't write anything, only show what's gonna be done
                                                      [boolean] [default: false]