Coder Social home page Coder Social logo

huya's Introduction

虎粮自动发放

用于虎牙直播平台,自动发放用户虎粮。

使用说明

hy.login(username="", password="")  #  填写账号
hy.into_room(518512, 70)			#  房间号, 发放虎粮数目
hy.into_room(518511, 20)			#  房间号, 发放虎粮数目
  • 第一次登陆会需要进行扫码登陆,二维码保存在代码路径下,名为qr-username.png,打开扫码登陆即可;或者打开输出的QR-code url:xxxxx也可以。

  • 如果需要多个账号登陆,需要把这里的代码。(自己看着改吧

    path_chrome_data = os.getcwd() + '/chromeData'
    if not Path(path_chrome_data).exists():
        os.mkdir(path_chrome_data)
    chrome_options.add_argument(r'user-data-dir=' + path_chrome_data)
  • 运行需要chromedriver

  • 定时使用crontab0 8 * * * python main.py >> huya.log 2>&1

  • linux下selenium环境

    # 安装 google-chrome
    yum install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
    yum install -y mesa-libOSMesa-devel gnu-free-sans-fonts wqy-zenhei-fonts
    # 这里根据安装的chrome版本选择chromedriver
    wget https://npm.taobao.org/mirrors/chromedriver/94.0.4606.41/chromedriver_linux64.zip
    unzip chromedriver_linux64.zip
    mv chromedriver /usr/bin/
    chmod +x /usr/bin/chromedriver
    #安装selenium
    pip install selenium 

    518512 nb

huya'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.