当前位置:网站首页>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
边栏推荐
- 隔离和降级
- Yizhou Financial Analysis | The intelligent transformation of bank ATM machines is accelerated; the new Internet loan regulations bring challenges
- excel split text into different rows
- 如何理解 new (...args: any[]) => any
- familiar friend
- number of solutions to solve a multivariate multi-degree equation
- 小程序毕设作品之微信美食菜谱小程序毕业设计成品(5)任务书
- How to prevent governance attacks in DAOs?
- 解决yolov5训练时出现:“AssertionError: train: No labels in VOCData/dataSet_path/train.cache. Can not train ”
- 用virtualenv和Virtualenvwrapper虚拟环境管理工具创建虚拟环境
猜你喜欢
随机推荐
联邦学习在金融领域的发展和应用
力扣第 304 场周赛复盘
SRv6 L3VPN的工作原理
2022 edition of MySQL tutorial, top collection good, take your time
Getting Started Database Days4
visual studio code multiple editing
从0到1:图文投票小程序设计与研发笔记
如何给 UE4 场景添加游戏角色
Lecture 3: Several common table field data types in MySQL database
华为无线设备配置全局双链路冷备份(AC全局配置方式)
选择合适的 DevOps 工具,从理解 DevOps 开始
小程序毕设作品之微信美食菜谱小程序毕业设计成品(5)任务书
10年稳定性保障经验总结,故障复盘要回答哪三大关键问题?|TakinTalks大咖分享
Analysis of the development trend of game metaverse
线程池分析
03、GO语言变量定义、函数
Recycling rental system 100% open source without encryption Mall + recycling + rental
【C补充】链表专题 - 单向链表
关于ETL的两种架构(ETL架构和ELT架构)
familiar friend