Code Monkey home page Code Monkey logo

latiaoaid's Introduction

LatiaoAid 1.3

Github Action Badge

Introduction

This python script collects 辣条/亲密度 on live.bilibili.com using selenium webdriver.

Issues are warmly welcomed. Feel free to raise one if you found a bug, or have a great idea, or anything.

Example log:

[2020-04-27 17:15:56.729825] 【一个小奶瓶儿】白嫖启动 (゜-゜)つロ

[2020-04-27 17:15:57.473284] 【一个小奶瓶儿】恭喜奶瓶家的清雪yu上任舰长 亲密度到手 (゜-゜)つロ

[2020-04-27 17:16:01.881398] 【一个小奶瓶儿】等 107 秒再来 (゜-゜)つロ

[2020-04-27 17:17:53.138381] 【一个小奶瓶儿】感谢女神小奶瓶 赠送的小电视飞船 辣条到手 (゜-゜)つロ

[2020-04-27 17:17:57.562686] 【一个小奶瓶儿】没辣条了 (゜-゜)つロ

[2020-04-27 17:18:02.972501] 【creamOUO】白嫖启动 (゜-゜)つロ

[2020-04-27 17:18:03.573169] 【creamOUO】感谢没错我就是FG 赠送的小电视飞船 辣条到手 (゜-゜)つロ

[2020-04-27 17:18:06.999048] 【creamOUO】没辣条了 (゜-゜)つロ

[2020-04-27 17:19:16.961655] 【玖绫Aya】白嫖启动 (゜-゜)つロ

[2020-04-27 17:19:17.582990] 【玖绫Aya】等 109 秒再来 (゜-゜)つロ

[2020-04-27 17:21:10.759032] 【玖绫Aya】感谢亚总の文件尼 赠送的小电视飞船 辣条到手 (゜-゜)つロ

Release Note

Version 1.3

Various performance and stability improvements.

Add support for headless mode (need pillow to show login qrcode).

Version 1.2

An ugly, yet stable release. 99.9% exceptions are handled, enabling it to be deployed on a server.

Dependencies

Firstly, You need browsers that support selenium. See documentations of selenium for more details. The default browser used in this project is Firefox. You can use other browsers, but you need to modify class LatiaoAid.

Then, you have to install some other dependencies:

  • Python 3.7
  • Firefox browser
  • Pillow==7.1.2
  • selenium==3.141.0
  • urllib3==1.25.9

Job can be done easily with:

pip install -r requirements.txt

Or you may want to use virtual environment.

virtualenv LatiaoAidVenv --python=python3.7
cd LatiaoAidVenv
source bin/activate
git clone [email protected]:0xSeanll/LatiaoAid.git
cd LatiaoAid
pip install -r requirements.txt

Then you can use LatiaoAid freely.

Usage

Step1. start the script

You can run it in console and python3 console_run.py will do the job, or use python3 console_run.py -h to get help information if you want to sepcified some parameters.

Besides, this is a Pycharm project, so you can also run it in Pycharm directly.

Step2. login to bilibili.com

You will need login to bilibili.com manually (the script will bring up the login page or qrcode (in headless mode) for you).

Step3. wait for latiao!

After logged in, the script will work automatically.

Note: The website may require some users to do human-verification. It is recommended use non-headless mode to test whether the script works properly first.

Todo

  • More sophisticated logic for waiting for and collecting Latiao.
  • GUI.
  • Support headless.

Disclaimer

This project is just for fun.

Channel 528 on live.bilibili.com is irrelevant to this project, even though it was chosen to be the base tab.

latiaoaid's People

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.