我的第一个python爬虫脚本
2017-01-20 00:04
302 查看
import re
import urllib
conn=urllib.urlopen("http://www.youwu.cc/")
html=conn.read()
imgre=r'src="([^"]+\.jpg)"'
imglist=re.findall(imgre,html)
i=0
for img in imglist:
i+=1
urllib.urlretrieve(img,"D:\girl\girl%s.jpg"%i)
import urllib
conn=urllib.urlopen("http://www.youwu.cc/")
html=conn.read()
imgre=r'src="([^"]+\.jpg)"'
imglist=re.findall(imgre,html)
i=0
for img in imglist:
i+=1
urllib.urlretrieve(img,"D:\girl\girl%s.jpg"%i)
相关文章推荐
- Python 爬虫3——第一个爬虫脚本的创建
- Python 爬虫3——第一个爬虫脚本的创建
- 如何开始写你的第一个python脚本——简单爬虫入门!
- 编写第一个python 脚本(重要文件创建备份)
- [搬运老博客]我的第一个python脚本——hello,python
- [Python脚本]——网页爬虫开始
- 我的第一个Python爬虫
- 利用python脚本抓取AC的代码[爬虫+HTMLParser+handle_entityref+正则表达式+模拟登陆+文件操作]
- [Python]网络爬虫(12):爬虫框架Scrapy的第一个爬虫示例入门教程
- python的第一个脚本
- selenium_webdriver(python)的第一个脚本
- 简明 Python 教程中的第一个备份脚本
- 我的第一个在Linux中的极为简单的Python脚本
- python 网站爬虫 下载在线盗墓笔记小说到本地的脚本
- python 网站爬虫 下载在线盗墓笔记小说到本地的脚本
- [Python]网络爬虫(12):爬虫框架Scrapy的第一个爬虫示例入门教程
- 我的第一个python脚本
- [python脚本]一个简单的web爬虫(1)
- 学习shell的时候 第一个脚本就是ping监控 python版
- python编写网页爬虫脚本并实现APScheduler调度