爬虫案例——豆瓣出版商
2018-03-14 15:27
197 查看
爬取豆瓣出版商名称,并存储在本地文件中。import urllib.request
data=urllib.request.urlopen('https://read.douban.com/provider/all').read()
data=data.decode('utf-8')
import re
pat='<div class="name">(.*?)</div>'
a=re.compile(pat).findall(data)
print(a)
file=open('D:/1python/爬虫.txt','w')
for i in range(0,len(a)):
file.write(a[i]+'\n')
file.close()
——来自韦玮老师课堂
data=urllib.request.urlopen('https://read.douban.com/provider/all').read()
data=data.decode('utf-8')
import re
pat='<div class="name">(.*?)</div>'
a=re.compile(pat).findall(data)
print(a)
file=open('D:/1python/爬虫.txt','w')
for i in range(0,len(a)):
file.write(a[i]+'\n')
file.close()
——来自韦玮老师课堂
相关文章推荐
- Python爬虫小案例:豆瓣电影TOP250
- Python爬虫(二十二)_selenium案例:模拟登陆豆瓣
- 爬虫案例若干-爬取CSDN博文,糗事百科段子以及淘宝的图片
- 小象数据分析和数据挖掘(豆瓣数据案例,时间序列分析和金融数据,金融数据分析案例)
- 爬虫——多线程糗事百科案例
- R的爬虫和回归模型案例-以北京自如房租价格为例
- 自己动手,丰衣足食!Python3网络爬虫实战案例
- Python爬虫入门2 | 爬取豆瓣电影信息
- Python-利用beautifulsoup写个豆瓣热门图书爬虫
- <Python爬虫>爬取豆瓣图书/豆瓣电影系列
- Python网络爬虫实战案例之:7000本电子书下载(2)
- Python爬虫豆瓣电影top250
- Python爬虫——8-1.scrapy深度爬取案例—百思不得姐
- nodejs爬虫案例笔记
- Python爬虫学习笔记——豆瓣登陆(二)
- python 爬虫(正则表达式案例)
- python 爬虫入门案例----爬取某站上海租房图片
- 爬虫豆瓣完整版
- 爬虫豆瓣电影top250代码和收获
- (案例四)图片下载器爬虫