Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

weibo-spider

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weibo-spider

a weibo spider

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

weibo-spider

初始化

const WeiboSpider = require('weibo-spider')
let weiboSpider = new WeiboSpider({
    cookie: 'you cookie here',
    requestInterval: 300
})

获取用户资料详情

用法如下:

weiboSpider.profile(1065918465)

返回值如下:

{
    userName: '',           // 微博作者名字
    userLink: '',           // 微博作者主页链接
    userDaren: false,       // 是否是达人
    isOrgin: false,         // 是否是原创
    hasVideo: false         // 是否包含视频
}

获取搜索结果

用法如下:

weiboSpider.topic({
    keyword: '你捐的衣服去哪里了',
    starttime: '20200419',
    endtime: '20200420'
})

返回结果示例如下:

{
  "totalCount": 10,
  "mblogs": [
    {
      "id": "IEePnEdbU",
      "content": "",
      "isOrgin": true,
      "hasVideo": false,
      "attribudeCount": 0,
      "repostCount": 0,
      "commentCount": 0,
      "addFavCount": 0,
      "author": {
        "userName": "民生时刻",
        "userLink": "https://weibo.cn/u/6586581125",
        "isDaren": false,
        "isV": false,
        "isVIP": false,
        "userDaren": false
      }
    },
    {
      "id": "IEePnBvcO",
      "content": "",
      "isOrgin": true,
      "hasVideo": false,
      "attribudeCount": 0,
      "repostCount": 0,
      "commentCount": 0,
      "addFavCount": 0,
      "author": {
        "userName": "关注趣闻君",
        "userLink": "https://weibo.cn/u/6405076916",
        "isDaren": false,
        "isV": false,
        "isVIP": false,
        "userDaren": false
      }
    }
  ],
  "nextUrl": "https://weibo.cn/search/mblog?hideSearchFrame=&keyword=%E4%BD%A0%E6%8D%90%E7%9A%84%E8%A1%A3%E6%9C%8D%E5%8E%BB%E5%93%AA%E9%87%8C%E4%BA%86&advancedfilter=1&starttime=20200417&endtime=20200420&sort=time&page=2",
  "keyword": "你捐的衣服去哪里了"
}

Keywords

FAQs

Package last updated on 09 Jun 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc