当前位置:网站首页>唯美girls
唯美girls
2022-07-29 05:23:00 【赵颂@】
import requests ,re
from fake_useragent import UserAgent
import time,os
#请求网页
url="https://www.vmgirls.com/13344.html"
headers ={
"User-Agent":UserAgent().chrome
}
#表明自己的一个身份
r=requests.get(url,headers=headers)
#print(r.request.headers) #查看头部信息
#print(r.text)
html =r.text
#解析网页
dirname=re.findall('<h1 class="post-title h3">(.*?)</h1>',html)[0]
result =re.findall('<a href="(.*?)" alt=".*?" title=".*?">',html)
if not os.path.exists(dirname):
os.mkdir(dirname)
#保存图皮片
for url in result:
time.sleep(1)
#图片的名字
filename=url.split("/")[-1]
print("正在下载:"+filename)
r = requests.get(url, headers=headers)
with open (dirname+ "/" +filename,"wb")as f:
f.write(r.content)
边栏推荐
- 2022 spring move - core technology FPGA post technical aspects (one side experience)
- 基于STM32:情侣互动玩偶(设计方案+源码+3D图纸+AD电路)
- 【软件工程之美 - 专栏笔记】22 | 如何为项目做好技术选型?
- Transformer review + understanding
- 【软件工程之美 - 专栏笔记】24 | 技术债务:是继续修修补补凑合着用,还是推翻重来?
- SimpleFOC调参1-力矩控制
- 华为云14天鸿蒙设备开发-Day7WIFI功能开发
- HAL库学习笔记- 9 DMA
- STM32 MDK(Keil5) Contents mismatch错误总结
- Based on stc51: schematic diagram and source code of four axis flight control open source project (entry-level DIY)
猜你喜欢
Based on stc51: schematic diagram and source code of four axis flight control open source project (entry-level DIY)
基于wifi的温度采集与控制系统
STM32 printf问题总结 semihosting microLIB理解
基于51单片机ADC0808的proteus仿真
华为云14天鸿蒙设备开发-Day5驱动子系统开发
【软件工程之美 - 专栏笔记】26 | 持续交付:如何做到随时发布新版本到生产环境?
基于51单片机的直流电机调速系统(L298的使用)
Review of neural network related knowledge (pytorch)
CS5340国产替代DP5340多比特音频 A/D 转换器
ABSA1: Attentional Encoder Network for Targeted Sentiment Classification
随机推荐
三国演义章节内容
2.4G频段的无线收发芯片 SI24R1 问题汇总解答
Hal library learning notes-11 I2C
基于msp430f2491的proteus仿真
【软件工程之美 - 专栏笔记】14 | 项目管理工具:一切管理问题,都应思考能否通过工具解决
基于51单片机的直流电机调速系统(L298的使用)
智慧能源管理系统解决方案
Reading papers on false news detection (I): fake news detection using semi supervised graph revolutionary network
基于51单片机的四路抢答器仿真
ML7 self study notes
Hal library learning notes-12 SPI
八大排序----------------冒泡排序
Torch. NN. Embedding() details
FPGA based: moving target detection (supplementary simulation results, available)
封装——super关键字
From entry to soul: how to use tb6600 single chip microcomputer to control stepping motor with high precision (42/57)
Open source based on STM32: MHD Bluetooth speaker (including source code +pcb)
华为云14天鸿蒙设备开发-Day1源码获取
HAL库学习笔记-14 ADC和DAC
链表--------------------尾插法