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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ispider

v0.0.4

Published

iSpider is a simple and fast web spider written with Nodejs!

Readme

ispder

这是一个用superagent + phantomjs 写的一个小爬虫,尽量简单,代码几乎都是用ES6语法写的,简单直白。

  • 主体核心是core.js这个文件,这是一个继承自EventEmitter的类。

expamle

例子可以参见examples文件夹的

API

创建一个爬虫需要定义 urlInfo

urlInfo是一个对象,它有以下属性:

  • 必须 url : {string} 需要抓取的地址。
  • 选填 isDynamic : {boolean} 默认false,true设置是用phantomjs请求url
  • 选填 phantomConfig : {string} phantomjs执行的【静态】命令config.json文件路径,可以不用配置,默认有一个,如果配置的false,那么默认的也不用
  • 选填 phantomLines : {array} phantomjs执行的【动态】命令,比如proxy呀,cookie文件呀,默认不用设置 //具体配置参见http://phantomChild.org/api/command-line.html
  • 选填 phantomBridgeJs : {string} 和phantomjs桥接js,可以自己再写一个,默认有一个,如果要自定义,可以参照[_lib/phantom-spec.js]。
  • 选填 isGenerateImg : {boolean} 设置是否生成图片和html,[true] :生成的图片会以 [域名 + 时间]组合
  • 选填 generatePath : {string} 生成图片存放在哪里,默认:会放置在examples里面
  • 选填 tiemout : {number} 执行的超时时间,默认:10000毫秒 即10秒