当前位置:网站首页>一键过滤选择百度网盘文件
一键过滤选择百度网盘文件
2022-07-04 05:21:00 【a10615】
背景
今天拍照馆通过百度网盘给我发了266张照片,让我选择20张入册。但对方把.CR2和.JPG两种格式都发过来了,其实我只需要把.JPG的下载下来,然后去选择。但我需要从中选择133张,这种数量多、重复性的工作,挺考验耐力的。作为程序员,肯定要想个懒办法去解决它,毫无疑问,就从前端(Ctrl+Shift+I,浏览器的开发者工具)来解决
找到两种文件的不同点
对应的元素布局:
<dd class="g-clearfix AuPKyz open-enable" _position="132" _cmd_installed="1" _installed="1">
<span node-type="EOGexf" class="EOGexf"></span>
<div class="JS-fileicon fileicon-small-pic"></div>
<div class="file-name" style="width:60%">
<div class="text">
<a href="javascript:void(0);" class="filename" title="_P5A1453.JPG">_P5A1453.JPG</a>
</div>
...
</div>
</dd>
<dd class="g-clearfix AuPKyz" _position="133" _cmd_installed="1" _installed="1">
<span node-type="EOGexf" class="EOGexf"></span>
<div class="JS-fileicon default-small"></div>
<div class="file-name" style="width:60%">
<div class="text">
<a href="javascript:void(0);" class="filename" title="_P5A1397.CR2">_P5A1397.CR2</a>
</div>
...
</div>
</dd>
不同点就在<dd>
标签内的class中。所以只要这么一捞,133个文件就全部捞出来了:
document.getElementsByClassName('g-clearfix AuPKyz open-enable')
执行点击事件
剩下的,就是给执行点击操作:
document.getElementsByClassName('g-clearfix AuPKyz open-enable').forEach(item => item.firstElementChild.click())
注意:
item.click()
,是单选功能,而多选,必须使用其子元素<span>
边栏推荐
- [paper summary] zero shot semantic segmentation
- 19. Framebuffer application programming
- Unity2D--人物移动并转身
- Flask
- FreeRTOS 中 RISC-V-Qemu-virt_GCC 的 锁机制 分析
- Zzulioj:1201: mode problem
- ETCD数据库源码分析——初始化总览
- TCP state transition diagram
- 2022g2 power station boiler stoker special operation certificate examination question bank and answers
- left_and_right_net可解释性设计
猜你喜欢
Daily question brushing record (12)
2022年A特种设备相关管理(电梯)考试题模拟考试平台操作
Void convolution, deformable convolution, deformable ROI pooling
2022 Guangdong provincial competition - code information acquisition and analysis flag
VB. Net GIF (making and disassembling - optimizing code, class library - 5)
2022 R2 mobile pressure vessel filling retraining question bank and answers
[paper summary] zero shot semantic segmentation
19.Frambuffer应用编程
How to configure static IP for Kali virtual machine
transformer坑了多少算力
随机推荐
[matlab] matlab simulation modulation system - DSB system
IP时代来临,电竞酒店如何借好游戏的“东风”?
Halcon图片标定,使得后续图片处理过后变成与模板图片一样
LM小型可编程控制器软件(基于CoDeSys)笔记二十二:错误4268/4052
BUU-Pwn-test_ your_ nc
fastjson
[matlab] general function of communication signal modulation inverse Fourier transform
Unity is connected to the weather system
left_and_right_net正常版本
Analysis of classical pointer and array written test questions in C language
[matlab] communication signal modulation general function - low pass filter
[untitled]
[paper summary] zero shot semantic segmentation
Google Chrome browser will support the function of selecting text translation
flink1.13 sql基础语法(二)join操作
2022 R2 mobile pressure vessel filling retraining question bank and answers
C # character similarity comparison general class
Flask
Remote desktop client RDP
BUU-Real-[PHP]XXE