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

eightylegs

v0.0.1

Published

Simplified api wrapper for 80legs api

Downloads

5

Readme

eightylegs

Simplified api wrapper for 80legs api

Quick Example

var eightyLegs = require('eightylegs')('API_KEY')
  , list       = [ 'www.google.com', 'www.facebook.com' ]
  , name       = 'My first url list'
eightyLegs.createUrlList(name, list, function(err, result) {
  //If create successfully, result will be your url list name (My first url list)
})

var options = {
    app : 'FullPageContent.js' // Default value
  , urllist : name // Should not be empty
  , 'max_depth' : 0 // Default value
  , 'max_urls' : 20 // Default value
}
var crawlName = 'My first crawl'
eightyLegs.createCrawl(options, crawlName, function(err, result) {
    // If create successfully, result will be object that contains exact same property with 80legs default return value.
})

Download

The source is available for download from GitHub.. Alternatively, you can install using Node Package Manager (npm):

npm install eightylegs

Documentation

Init

You can require eighylegs by simpily add your API_KEY as parameter

var eightyLegs = require('eightylegs')('API_KEY')

URL List

Crawl

URL List

Create a url list that contains an array of website urls that you want to crawl

Arguments

  • urlListName - The name of url list that you want to create.
  • urlList - An array consists of urls that you want to crawl
  • callback(err, result) - A callback which is fired when create process is finished, if something went wrong, err will not be null and will consists two properties code and message representing related error code and message, please refer to 80legs api doc to see detail.

Example

var eightyLegs = require('eightylegs')('API_KEY')
  , list       = [ 'www.google.com', 'www.facebook.com' ]
  , name       = 'My first url list'
eightyLegs.createUrlList(name, list, function(err, result) {
  //If create successfully, result will be your url list name (My first url list)
})

Arguments

  • callback(err, result) - A callback which is fired when get process is finished, if something went wrong, err will not be null and will consists two properties code and message representing related error code and message, please refer to 80legs api doc to see detail.

Example

var eightyLegs = require('eightylegs')('API_KEY')
eightyLegs.getAllUrlLists(function(err, result) {
  //If get successfully, result will be your url lists (Formatted in array)
})

Get a url list that named urlListName

Arguments

  • urlListName - The name of url list that you want to get.
  • callback(err, result) - A callback which is fired when get process is finished, if something went wrong, err will not be null and will consists two properties code and message representing related error code and message, please refer to 80legs api doc to see detail.

Example

var eightyLegs = require('eightylegs')('API_KEY')
  , name       = 'My first url list'
eightyLegs.getUrlListByName(name, function(err, result) {
  //If get successfully, result will be your url list named 'My first url list'
})

Delete a url list that named urlListName

Arguments

  • urlListName - The name of url list that you want to delete.
  • callback(err, result) - A callback which is fired when delete process is finished, if something went wrong, err will not be null and will consists two properties code and message representing related error code and message, please refer to 80legs api doc to see detail.

Example

var eightyLegs = require('eightylegs')('API_KEY')
  , name       = 'My first url list'
eightyLegs.deleteUrlList(name, function(err, result) {
  //If delete succesfully, err will be null and result will be url list name (My first url list)
})

Crawl

Create a crawl that you want to execute named crawlName

Arguments

  • options - The required options to create a crawl in 80legs.
    • app - The web crawl app name that 80legs will use. Default value will be FullPageContent.js
    • urllist - The url list named urllist that you want to crawl. CANNOT BE EMPTY!
    • max_depth - The depth of website you want to crawl. Default value will be 0
    • max_urls - The max urls that this 80legs app will crawl in url list. Default value will be 20
  • crawlName - The name of crawl that you want to create.
  • callback(err, result) - A callback which is fired when create process is finished, if something went wrong, err will not be null and will consists two properties code and message representing related error code and message, please refer to 80legs api doc to see detail.

Example

var eightyLegs = require('eightylegs')('API_KEY')
  , name       = 'My first crawl'
  , option     = {
        app         : 'FullPageContent.js' // Can be omitted
      , urllist     : 'My first url list' // Can not be omitted
      , 'max_depth' : 0 // Can be omitted
      , 'max_urls'  : 20 // Can be omitted
    }
eightyLegs.createCrawl(option, name, function(err, result) {
  //If create succesfully, err will be null and result will be status of crawl you just created
})

Get a crawl that named crawlName

Arguments

  • crawlName - The name of crawl that you want to get.
  • callback(err, result) - A callback which is fired when get process is finished, if something went wrong, err will not be null and will consists two properties code and message representing related error code and message, please refer to 80legs api doc to see detail.

Example

var eightyLegs = require('eightylegs')('API_KEY')
  , name       = 'My first crawl'

eightyLegs.getResultByName(option, name, function(err, result) {
  //If crawl is not finished yet, the result will be false
  //If crawl is finished, the result will be the array of final crawl results
})