Socket
Socket
Sign inDemoInstall

qiguo_ganther

Package Overview
Dependencies
72
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    qiguo_ganther

qiguo curl[fetch]


Version published
Weekly downloads
1
Maintainers
1
Install size
7.95 MB
Created
Weekly downloads
 

Readme

Source

qiguo_gather

提供一个handle的接口

  • handle 提供两个接口 addRule,exec
  • handle args -> url, rule, wait, waitFn
  • url 抓取的地址
  • rule 抓取的规则
    • dom args exe: 1 选择器字符串 2 要去的类型 (属性[],text,html)

    • interface args exe: 1 url(请求url) 2. 'data[0].bittype'(json定位)

    • self args exe 1.self

    • page-str args exe: 1. start(开始符) 2. end(结束符)

  • wait 页面是否需要延迟获取这个一般和waitFn一起
  • waitFn 当有wait参数时 什么时候获取页面 方法写在waitFn里

var rule = 'xxxxxx';
var url = 'https://item.taobao.com/item.htm?id=520003539079';

var h = handle(url,null,true,function check(){
  return true;
});

h.addRule({off:{type:"dom",args:["#J_RateCounter","text"]}});

h.exec(function(err, html, api){
  console.log(api);
});


Keywords

FAQs

Last updated on 05 Jan 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc