当前位置:网站首页>How to use pywinauto and pyautogui to link the anime lady and sister please go home
How to use pywinauto and pyautogui to link the anime lady and sister please go home
2022-08-01 22:38:00 【Oriental Golden Wood】
First determine the link
https://author.baidu.com/home/1584651610617850
使用chrime浏览
Scroll the page down to the bottom
F12
copy
All page source code
Assigned to as a stringpython变量
Use the code below to grab the link
import re
data=re.compile('nid=dt_[0-9]+').findall(url_data)
data=["https://mbd.baidu.com/newspage/data/dtlandingsuper?"+i for i in data]
# print()
from pywinauto import Application
from pywinauto import mouse
import pyautogui
import time
import pyperclip
chrome_dir="C:/Program Files/Google/Chrome/Application/chrome.exe"
chrome = Application(backend='uia')
for one in data:
chrome.start(chrome_dir + ' --force-renderer-accessibility --incognito --start-maximized '+one,timeout=5)
mouse.move(coords=(420, 420))
time.sleep(0.5)
mouse.move(coords=(490, 490))
# mouse.double_click(button='left', coords=(200, 200))
# pyautogui.click(490,490,duration=0.5)
pyautogui.press("F12")
pyautogui.click(1520,300,duration=0.5)
pyautogui.click(1520,500,duration=0.5)
send_keys=""" document.querySelector("#app > div > div.app-module_contentWrapper_12u0y > div > div.app-module_leftSection_2GBVu > div.index-module_articleContainer_32gOp > div.index-module_contentContainer_3mQeg > div > div > div > div > div > div:nth-child(1) > div.index-module_img_2Y2y2.index-module_border-radius-tl_14YCd").click() """
pyperclip.copy(send_keys)
pyautogui.hotkey('ctrl','v')
pyautogui.press("enter")
send_keys=""" (function(console){ console.save = function(data, filename){ if(!data) { console.error('Console.save: No data') return; } if(!filename) filename = 'console.json' if(typeof data === "object"){ data = JSON.stringify(data, undefined, 4) } var blob = new Blob([data], {type: 'text/json'}), e = document.createEvent('MouseEvents'), a = document.createElement('a') a.download = filename a.href = window.URL.createObjectURL(blob) a.dataset.downloadurl = ['text/json', a.download, a.href].join(':') e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null) a.dispatchEvent(e) } })(console); var image_count=document.querySelector("#app > div > div.app-module_contentWrapper_12u0y > div > div.app-module_leftSection_2GBVu > div.index-module_articleContainer_32gOp > div.index-module_contentContainer_3mQeg > div > div > div > div > div > div > div").childElementCount; var turl="" for (i=4;i<=image_count;i++) {var url=document.querySelector("#app > div > div.app-module_contentWrapper_12u0y > div > div.app-module_leftSection_2GBVu > div.index-module_articleContainer_32gOp > div.index-module_contentContainer_3mQeg > div > div > div > div > div > div > div > div:nth-child("+i+") > img").getAttribute("src"); console.log(url); turl+="#####"+url;}; console.save(turl,"x.txt") """
pyperclip.copy(send_keys)
pyautogui.hotkey('ctrl','v')
pyautogui.press("enter")
time.sleep(2)
Finally merge the downloaded files
使用迅雷下载即可
The above example source code and link
https://download.csdn.net/download/weixin_32759777/86268530
边栏推荐
- xctf attack and defense world web master advanced area webshell
- 论文解读(GSAT)《Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism》
- 数据分析04
- 03. GO language variable definition, function
- 线程池分析
- 移动端人脸风格化技术的应用
- 联邦学习在金融领域的发展和应用
- Getting Started Database Days4
- 华为无线设备配置全局双链路冷备份(AC全局配置方式)
- 安全第五次课后练习
猜你喜欢

2022年最新河北建筑八大员(机械员)模拟考试题库及答案

No more rolls!After joining ByteDance for a week, he ran decisively.

美赞臣EDI 940仓库装运订单详解

威纶通触摸屏如何打开并升级EB8000旧版本项目并更换触摸屏型号?

如何给 UE4 场景添加游戏角色

小程序毕设作品之微信美食菜谱小程序毕业设计成品(7)中期检查报告

解决yolov5训练时出现:“AssertionError: train: No labels in VOCData/dataSet_path/train.cache. Can not train ”

xss相关知识点以及从 XSS Payload 学习浏览器解码

从0到100:招生报名小程序开发笔记

(翻译)按钮的对比色引导用户操作的方式
随机推荐
excel clear format
感觉自己好傻
Prufer sequence
Mini Program Graduation Works WeChat Food Recipe Mini Program Graduation Design Finished Product (8) Graduation Design Thesis Template
03、GO语言变量定义、函数
小程序毕设作品之微信体育馆预约小程序毕业设计成品(1)开发概要
【C补充】链表专题 - 单向链表
1. @Component注解的原理剖析
JS prototype hasOwnProperty in 加方法 原型终点 继承 重写父类方法
long investment career
易周金融分析 | 银行ATM机智能化改造提速;互联网贷款新规带来挑战
User Experience | How to Measure User Experience?
Postman batch test interface detailed tutorial
论文解读(GSAT)《Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism》
入门数据库Days4
Yizhou Financial Analysis | The intelligent transformation of bank ATM machines is accelerated; the new Internet loan regulations bring challenges
How to prevent governance attacks in DAOs?
familiar friend
系统可用性:SRE口中的3个9,4个9...到底是个什么东西?
npm包【详解】(内含npm包的开发、发布、安装、更新、搜索、卸载、查看、版本号更新规则、package.json详解等)