当前位置:网站首页>【无标题】
【无标题】
2022-07-06 14:53:00 【freshfox】
#-*- coding:utf-8 -*-
from bs4 import BeautifulSoup
import requests
def get_imgs(xml_name = 'output.xml'):
file = open('1.html', encoding='utf-8').read()
soup = BeautifulSoup(file, 'xml')
count =0
try :
for node in soup.findChildren('img'):
src = node['src']
count =count+1
if count > 3:
break
print ("src : " + src)
response = requests.get(src)
img = response.content
path = '%s.jpg' % (count)
with open(path, 'wb') as f:
f.write(img)
except Exception as e:
print("get exception " + e)
get_imgs()边栏推荐
- Unity3d minigame unity webgl transform plug-in converts wechat games to use dlopen, you need to use embedded 's problem
- sizeof关键字
- 2500 common Chinese characters + 130 common Chinese and English characters
- 雅思口语的具体步骤和时间安排是什么样的?
- Self made j-flash burning tool -- QT calls jlinkarm DLL mode
- What are the interface tests? What are the general test points?
- C # réalise la liaison des données du rapport Crystal et l'impression du Code à barres 4
- NPDP certification | how do product managers communicate across functions / teams?
- 【sdx62】WCN685X将bdwlan.bin和bdwlan.txt相互转化操作方法
- Aardio - 不声明直接传float数值的方法
猜你喜欢

硬件開發筆記(十): 硬件開發基本流程,制作一個USB轉RS232的模塊(九):創建CH340G/MAX232封裝庫sop-16並關聯原理圖元器件

Export MySQL table data in pure mode
![[线性代数] 1.3 n阶行列式](/img/6e/54f3a994fc4c2c10c1036bee6715e8.gif)
[线性代数] 1.3 n阶行列式

That's why you can't understand recursion

如何用程序确认当前系统的存储模式?

2500个常用中文字符 + 130常用中英文字符

Build op-tee development environment based on qemuv8

Crawler obtains real estate data
Learn the principle of database kernel from Oracle log parsing

Installation and use of labelimg
随机推荐
void关键字
软考高级(信息系统项目管理师)高频考点:项目质量管理
Seata aggregates at, TCC, Saga and XA transaction modes to create a one-stop distributed transaction solution
C# 三种方式实现Socket数据接收
Management background --2 Classification list
AI 企业多云存储架构实践 | 深势科技分享
0 basic learning C language - digital tube
Aardio - 封装库时批量处理属性与回调函数的方法
(18) LCD1602 experiment
HDR image reconstruction from a single exposure using deep CNN reading notes
硬件開發筆記(十): 硬件開發基本流程,制作一個USB轉RS232的模塊(九):創建CH340G/MAX232封裝庫sop-16並關聯原理圖元器件
Leetcode exercise - Sword finger offer 26 Substructure of tree
China 1,4-cyclohexanedimethanol (CHDM) industry research and investment decision-making report (2022 Edition)
What are the interface tests? What are the general test points?
GD32F4XX串口接收中断和闲时中断配置
C # réalise la liaison des données du rapport Crystal et l'impression du Code à barres 4
剪映+json解析将视频中的声音转换成文本
[linear algebra] determinant of order 1.3 n
Mysql database basic operations DML
Inno setup packaging and signing Guide