python 自動刷 愛奇藝 bilibili 視頻播放量

 

 

import json
import logging
import os
import socket
import traceback
from time import sleep
from time import time

import pyautogui
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s -%(lineno)d - %(message)s')
logger = logging.getLogger(__name__)

pyautogui.FAILSAFE = False


def connect(name, username, password):
    try:
        cmd_str = "rasdial %s %s %s" % (name, username, password)
        os.system(cmd_str)
        ip = socket.gethostbyname(socket.gethostname())
        logger.info('connect success: ' + ip)
    except:
        logger.error('connect fail')


def disconnect(name):
    try:
        cmd_str = "rasdial %s /disconnect" % name
        os.system(cmd_str)
        logger.info('disconnect
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章