查询网页在指定关键词上的百度排名 baidu-rank

码农软件 · 软件分类 · 常用JavaScript包 · 2019-04-04 16:11:29

软件介绍

baidu-rank

查询网页在指定关键词上的百度排名。

安装

$ npm install baidu-rank

使用

下面的代码用来查询网页http://xc.hubwiz.com/course/597d463fff52d0da7e3e397a 在 vuex 关键字上的排名,查询范围为百度搜索结果页1~76:

var baiduRank = require('baidu-rank')

var url = 'http://xc.hubwiz.com/course/597d463fff52d0da7e3e397a'
var word = 'vuex'
var start = 1
var end = 76

baiduRank(url,word,start,end)
  .then(ret => console.log(ret))

输入结果类似如下:

=> vuex
[{
  word: 'vuex',
  url: 'http://xc.hubwiz.com/course/597d463fff52d0da7e3e397a',
  rank: 27
}]

本文地址:https://www.codercto.com/soft/d/2852.html

Algorithms Unlocked

Algorithms Unlocked

Thomas H. Cormen / The MIT Press / 2013-3-1 / USD 25.00

Have you ever wondered how your GPS can find the fastest way to your destination, selecting one route from seemingly countless possibilities in mere seconds? How your credit card account number is pro......一起来看看 《Algorithms Unlocked》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具