All Projects → princewck → weiboer

princewck / weiboer

Licence: other
基于nodejs 和puppeteer的微博自动发送工具

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to weiboer

Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+822.22%)
Mutual labels:  weibo
WeiboRobot
微博机器人,用于自动发微博和回复评论
Stars: ✭ 27 (+0%)
Mutual labels:  weibo
vue-weibo
用Vue.js及相关插件仿制的新浪微博移动版(m.weibo.cn)🌺
Stars: ✭ 69 (+155.56%)
Mutual labels:  weibo
weibotuchuang-electron
围脖是个好图床
Stars: ✭ 31 (+14.81%)
Mutual labels:  weibo
WeiboChaoHuaDaily
微博超话经验全收集:评论、打榜、签到
Stars: ✭ 26 (-3.7%)
Mutual labels:  weibo
ccgl
TKDE 22. CCCL: Contrastive Cascade Graph Learning.
Stars: ✭ 20 (-25.93%)
Mutual labels:  weibo
Awesome crawl
腾讯新闻、知乎话题、微博粉丝,Tumblr爬虫、斗鱼弹幕、妹子图爬虫、分布式设计等
Stars: ✭ 246 (+811.11%)
Mutual labels:  weibo
weibotools
微博工具。提供超话签到功能、自动点赞功能。
Stars: ✭ 32 (+18.52%)
Mutual labels:  weibo
weibo
a simple weibo app
Stars: ✭ 31 (+14.81%)
Mutual labels:  weibo
jianweibo
基于 Python Flask 的微博系统
Stars: ✭ 61 (+125.93%)
Mutual labels:  weibo
weiboPoemBot
A weibo-bot who can automatically send weibo with poem and art picture.
Stars: ✭ 17 (-37.04%)
Mutual labels:  weibo
tg-wb-trending
Github actions自动抓取微博热搜,每小时自动存档,通过github page生成网站和api
Stars: ✭ 42 (+55.56%)
Mutual labels:  weibo
nodejs-onesky-utils
Node.js utils for working with OneSky translation service.
Stars: ✭ 32 (+18.52%)
Mutual labels:  nodejs-modules
mifitxiaomipiholelist
MiFit/Xiaomi PiHole Bock List
Stars: ✭ 28 (+3.7%)
Mutual labels:  weibo
XLDotLoading
iOS 新浪微博红包加载动画
Stars: ✭ 30 (+11.11%)
Mutual labels:  weibo
Weibopicdownloader
免登录下载微博图片 爬虫 Download Weibo Images without Logging-in
Stars: ✭ 247 (+814.81%)
Mutual labels:  weibo
jackrabbit
Simple AMQP / RabbitMQ job queues for node based on amqplib
Stars: ✭ 28 (+3.7%)
Mutual labels:  nodejs-modules
napi-thread-safe-callback
C++ utility class to perform callbacks into JavaScript from any thread
Stars: ✭ 62 (+129.63%)
Mutual labels:  nodejs-modules
weibo
mod: Weibo Golang SDK
Stars: ✭ 26 (-3.7%)
Mutual labels:  weibo
flutter for weibo
一个基于flutter开发的微博
Stars: ✭ 32 (+18.52%)
Mutual labels:  weibo

https://github.com/princewck/weiboer

Description

一个用于自动发送微博的小插件

headless: false时效果图:

Install

npm i weiboer --save

Config

// config.json 微博账号设置
{
  "username": "185********",
  "password": "your.password",
}
// .weiboer.js 全局puppeteer配置
const path = require('path');
const { PC_AGENTS } = require('./libs/userAgents');

module.exports = {
  // cookie缓存路径,默认会使用上次的cookie,如果有效则不使用账号密码登陆
  'cookies_cache_path': path.resolve(__dirname, '.cookies'), 
  // 浏览器UA
  'default_ua': PC_AGENTS.SAFRI_MAC,
  // puppeteer 登陆选项
  'launch_options': {
    'headless': false,
  },
  'viewport_options': {
    'width': 1366,
    'height': 768,
    'deviceScaleFactor': 1,
  }
}

Usage

const weiboer = require('weiboer');
const path = require('path');
const configFile = path.resolve(__dirname, './config.json'); // 微博账号配置,
// configFile 可以缺省,但要至少确保环境变量中设置了username, password
const weiboHelper = weiboer.init(configFile);
weiboHelper.publish('微博内容', ['./images/01.jps', './images/02.jps']);

Methods

publish

Parameters

  • text:string 微博内容
  • images:Array 微博配图列表,本地图片路径

Results detecting

  weiboHelper.publish('xx', ['./some_img.jpg'])
    .then(() => {
      // success
    })
    .catch(() => {
      // error
    });
  async function someFun() {
    try {
      await  weiboHelper.publish('xx', ['./some_img.jpg']);
    } catch (e) {
      // error handlers
    }
  }

注意⚠️

请勿段时间频繁触发使用账号密码登陆流程,实测发现登陆一定次数后会出现输入账号正确仍然提示账号密码错误的情况。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].