【自动化】学习观看视频内容,无需人为干预

复制代码
import pyautogui
import requests
import time
from DrissionPage._pages.chromium_page import ChromiumPage
page = ChromiumPage()
page.get('https://zyjs.heb12333.cn')

page.ele('x://input[@class="el-input__inner"]').input("130******817")
page.ele('x://div[@class="el-input el-input--mini el-input--prefix el-input--suffix"]/input').input("Ly****@")
time.sleep(10)
page.ele('x://button[@class="el-button login-btn el-button--primary el-button--mini"]').click()
time.sleep(1)
page.get('https://webzyjs.heb12333.cn/index.html#/v_courseDetails?courseId=NeS75S1e49zyllShwmP5G&trainplanId=33a530966b504e65a9780bc0eabc9ee3&platformId=251&fromPage=selected')
time.sleep(2)



for i in range(1,5):
    page.get(f'https://webzyjs.heb12333.cn/index.html#/v_video?platformId=251&trainplanId=33a530966b504e65a9780bc0eabc9ee3&courseId=NeS75S1e49zyllShwmP5G&sectionId=NeS75S1e49zyllShwmP5G1-{i}')
    time.sleep(10)
        # xloc,yloc = pyautogui.position()
        # print(xloc,yloc)
    # pyautogui.click(950,656,button='left')
    # iconloc = pyautogui.locateOnScreen('play.png')
    # time.sleep(1)
    # pyautogui.click(iconloc)
    pyautogui.click(675, 465, button='left')
    if i == 1:
        times = 40
        ztimes = times * 60
    if i == 2:
        times = 14
        ztimes = times * 60
    if i == 3:
        times = 25
        ztimes = times * 60
    if i == 4:
        times = 40
        ztimes = times * 60

    time.sleep(ztimes)



    i += 1
    if i > 5:
        break
相关推荐
We་ct4 小时前
LeetCode 77. 组合:DFS回溯+剪枝,高效求解组合问题
开发语言·前端·算法·leetcode·typescript·深度优先·剪枝
KerwinChou_CN4 小时前
什么是流式输出,后端怎么生成,前端怎么渲染
前端
爱上妖精的尾巴4 小时前
8-20 WPS JS宏 正则表达式-懒惰匹配
服务器·前端·javascript
网络点点滴4 小时前
组件通信props方式
前端·javascript·vue.js
二十雨辰4 小时前
[小结]-线上Bug监控
前端·bug
前端技术4 小时前
【鸿蒙实战】从零打造智能物联网家居控制系统:HarmonyOS Next分布式能力的完美诠释
java·前端·人工智能·分布式·物联网·前端框架·harmonyos
CHU7290354 小时前
指尖践行环保——旧衣服回收小程序前端功能玩法详解
前端·小程序
LawrenceLan4 小时前
38.Flutter 零基础入门(三十八):网络请求实战 http、dio —— 获取列表与刷新 UI
开发语言·前端·flutter·dart
csdn_aspnet5 小时前
Asp.Net Core 10.0 中的 Blazor 增强功能
前端·后端·asp.net·blazor·.net10
SuperEugene5 小时前
Excel 上传解析 + 导出实战:Vue+xlsx 避坑指南|Vue生态精选
前端·javascript·vue.js·excel·xlsx·vxetable