当前位置:网站首页>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
边栏推荐
- 【SeaTunnel】从一个数据集成组件演化成企业级的服务
- 毫秒级!千万人脸库快速比对,上亿商品图片检索,背后的极速检索用了什么神器?
- Small application project works WeChat stadium booking applet graduation design of the finished product (1) the development profile
- JS prototype hasOwnProperty in 加方法 原型终点 继承 重写父类方法
- 美赞臣EDI 940仓库装运订单详解
- 46.全排列
- dvwa 通关记录1 - 暴力破解 Brute Force
- 【好书推荐】第一本无人驾驶技术书
- RxJs SwitchMapTo 操作符之移花接木
- APP专项测试:流量测试
猜你喜欢
SQL29 Calculate the average next day retention rate of users

【牛客刷题-SQL大厂面试真题】NO4.出行场景(某滴打车)

APP special test: traffic test

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

系统可用性:SRE口中的3个9,4个9...到底是个什么东西?

ROS2初级知识(8):Launching启动多节点

13、学习MySQL 分组

高等代数_证明_矩阵的任意特征值的代数重数大于等于其几何重数

游戏元宇宙发展趋势展望分析

Wechat Gymnasium Appointment Mini Program Graduation Design Finished Work (4) Opening Report
随机推荐
How to add a game character to a UE4 scene
No more rolls!After joining ByteDance for a week, he ran decisively.
联邦学习的框架搭建
【SeaTunnel】从一个数据集成组件演化成企业级的服务
visual studio code multiple editing
excel edit a cell without double clicking
小程序毕设作品之微信美食菜谱小程序毕业设计成品(5)任务书
隔离和降级
选择合适的 DevOps 工具,从理解 DevOps 开始
xss相关知识点以及从 XSS Payload 学习浏览器解码
1. @Component注解的原理剖析
论文解读(GSAT)《Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism》
数据增强--学习笔记(图像类,cnn)
【开源】Sentinel高性能高可用集群限流解决方案
vscode hide menu bar
NgRx Store createSelector 的单步调试和源代码分析
SRv6 L3VPN的工作原理
JS prototype hasOwnProperty in 加方法 原型终点 继承 重写父类方法
Prufer sequence
Safe fifth after-school exercise