Giter VIP home page Giter VIP logo

bili's Introduction

2233

  • 个人github上,太多烂尾的库,综合一波。。
  • 这个库里将放各种bili上的code就是了。。
  • 2019/02/08 再次维护这堆项目(能跑就行),维护完了
  • 之后如果有心情,加上动态的抢楼吧。然后抢楼的代码写得太丑了都看不下去了,还好封装的还行。不需要看太多就改好了,有兴趣再改一下那些headers的代码

目录结构

  • danmuku.py --- 弹幕爬虫
  • robfloor.py --- 抢楼器
  • dosign.py --- 直播签到,银瓜子换硬币脚本
  • old --- 存放旧代码(git会有记录,还是有点麻烦

BILI_RobFloor

说明

  • 自制B站抢楼器
  • 账号被封一概不负责
  • 目前基本就是封装调用了三个api。。。orz

使用方法

  • 当前目录下bilicookies文件存里登录cookie信息
  • 修改task函数,bi.run()传入相应的参数
  • 线程数,线程的等待自行调整

BILI类内,run(av_num, floor, content),av_num为要抢的视频号,floor是要抢的楼层,content是要发的评论的内容。不传入av_num则是搜索订阅的最新视频。

(多线程没有锁,所以有可能重复发...注意)

动态评论与视频评论现在会检测一个字段csrf,在cookies里有,加上这个就行了

直播签到与银瓜子换硬币

  • 当前目录下bilicookies文件存里登录cookie信息(最好是保存成功签到时用的cookies)
  • 然后执行dosign.py。即可
  • 若想自动化执行,找个服务器,Linux下可用 crontab设置定时任务。
  • silver2coin函数会使用银瓜子兑换硬币(升级用),自行决定使用与否,默认注释

弹幕爬虫说明

  • 目前是爬取指定av号或ep号番剧的弹幕存到本地
  • 弹幕信息有内容,时间,和时间2233

使用方法

PS E:\GITWORKS\BILI> python .\danmuku.py -h
usage: danmuku.py [-h] [-i INPUT] [-o OUTPUT]

Welcome to BILI

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        set the av_number or eq_number to crawl
  -o OUTPUT, --output OUTPUT
                        set the filename to store
PS E:\GITWORKS\BILI> python .\danmuku.py -i av42807128 -o danmu.csv
42807128
cid = 75051785
写入弹幕ing...
写入完成...请查看danmu.csv

bili's People

Contributors

tmn07 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.