python 爬多页贴吧的图片
来源:互联网 发布:超级淘宝店txt下载 编辑:程序博客网 时间:2024/06/15 12:23
#!/usr/bin/pythonimport reimport urllibdef getHtml(url): x=0 for i in range(1,5): print i new_link = re.sub('pn=\d+','pn=%d'%i, url, re.S) page = urllib.urlopen(new_link) html=page.read() reg = r'src="(.*?\.jpg)" size' imgre=re.compile(reg) imglist=re.findall(imgre,html) for imgurl in imglist: urllib.urlretrieve(imgurl,'%s.jpg'%x) x=x+1html = getHtml("https://tieba.baidu.com/p/5308010085?pn=1")
阅读全文
0 0
- python 爬多页贴吧的图片
- python 爬图吧的图片
- 【Python】Python简单的图片识别
- Python的Pexpect详解 [图片]
- Python的Base64编码图片
- python 抓取网上的图片。
- Python加载图片的方法
- Python的图片处理-待续
- python 对图片的截取
- Python做漂亮的图片
- python-抓取页面的图片
- 【Python】下载图片的代码
- python 实现图片的旋转
- 【python】简单的图片隐写术
- python读取图片的方式
- 爬取某图片网站多页图片的python爬虫
- Python学习--下载图片--下载百度的固定页面图片
- python开发的图片浏览程序
- [LeetCode]Generate Parentheses题解
- 线程的五大状态
- 轻院1075 聚餐人数统计
- Java SE的多态、接口
- 欧几里得算法
- python 爬多页贴吧的图片
- Guava 介绍
- vue2 in typescript2 (4)
- 夜间模式1
- WIN10 EDGE浏览器通知的关闭
- OFO和摩拜共享单车
- Java反射初探
- 向mysql数据库中插入大文本
- SSH与SSM学习之hibernate13——HQL查询