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

复制代码
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
相关推荐
用户0333074139512 小时前
TypeScript using 与 AsyncDisposableStack:在真实服务端代码中协调多资源清理
前端
web3d52012 小时前
Vue3 地图白屏排查清单:容器、弹窗与 ol-viewport 重复创建
vue.js·gis
daisychey12 小时前
用 Playwright 做多平台内容分发,我踩过的 8 个坑
前端
IT_陈寒13 小时前
为什么你应该学习JavaScript?
前端·人工智能·后端
大龄秃头程序员13 小时前
iOS冷启动监控Demo
前端
光影少年14 小时前
为什么 JavaScript 中 0.1 + 0.2 !== 0.3,如何让其相等?
前端·javascript·算法
掘金酱14 小时前
[稀土掘金 × 火山引擎] AI用量周榜冲刺赛|获奖名单公示
前端·人工智能·后端
泡泡oO14 小时前
“如果你还在用Superpowers,那我不要和你说话”
前端·后端·全栈
维克兜率天14 小时前
趋势过滤:避免被“假突破“反复打脸
前端
8年区块链老兵15 小时前
一篇文章教会你:用区块高度读懂比特币链上的每一笔交易
前端