Giter VIP home page Giter VIP logo

grab-text's Introduction

Grab text

This module is made for grabbing the largest piece of text from a website. Mainly use to grab lyrics from lyrics websites. For example AZLyrics, mojim...

Installation

Use as module:

npm install --save grab-text

Use as command:

npm install -g grab-text

Usage

You can use this module as a library or a command. The usage is really simple.

Library

var grab_text = require('./grab_text');

grab_text('http://www.azlyrics.com/lyrics/johnmayer/xo.html').then(text => {
  /* text here contains `
  Your love is bright as ever
  Even in the shadows
  Baby kiss me
  Before they turn the lights out
  Your heart is glowing
  And I'm crashing into you
  Baby kiss me, kiss me
  Before they turn the lights out
  Before they turn the lights out
  Baby love me lights out

  In the darkest night hour
  I'll search through the crowd
  Your face is all that I see
  I'll give you everything
  Baby, love me lights out
  Baby, love me lights out

  We don't have forever
  Baby daylight's wasting
  You better kiss me
  Before our time is run out
  Nobody sees what we see
  They're just hopelessly gazing
  Baby take me, take me
  Before they turn the lights out
  Before time is run out
  Baby love me lights out

  In the darkest night hour
  I'll search through the crowd
  Your face is all that I see
  I'll give you everything
  Baby, love me lights out
  Baby, love me lights out
  You can turn my lights out

  I love you like XO
  You love me like XO
  You kill me girl XO
  You love me like XO
  Is all that I see
  I'll give you everything
  Baby love me lights out
  Baby love me lights out
  You can turn my lights out

  In the darkest night hour
  I'll search through the crowd
  Your face is all that I see
  I'll give you everything
  Baby, love me lights out
  Baby, love me lights out
  You can turn my lights out` */
});

Command

> grab_text http://www.azlyrics.com/lyrics/johnmayer/xo.html

Then the output would be as expected.

Licence

MIT

grab-text's People

Contributors

ycmjason avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.