爬虫开始例子
来源:互联网 发布:java date 加一个月 编辑:程序博客网 时间:2024/04/29 04:56
#-- coding:utf -8--
#——-PYTHON 获取网页内容————-#
import sys, urllib
url = “https://www.zhihu.com/question/20899988” #网页地址
wp = urllib.urlopen(url) #打开连接
content = wp.read() #获取页面内容
fp = open(“E:\python.txt”,”w”) #打开一个文本文件
fp.write(content) #写入数据
fp.close() #关闭文件
0 0
- 爬虫开始例子
- 爬虫开始
- 开始学习写爬虫
- 2017开始学爬虫
- 一个爬虫例子
- Scrapy爬虫小例子
- 用户爬虫例子
- Matlab----网络爬虫例子
- 一个爬虫例子
- python3爬虫例子
- Java爬虫例子
- Python爬虫例子1
- scrapy爬虫小例子
- 一个scrapy爬虫例子
- php 爬虫例子
- Python爬虫例子
- python3.6 爬虫例子
- 【python爬虫】python使用代理爬虫例子
- cocos2dx调用Android其他activity
- POJ1703 Find them, Catch them
- 认识window.history
- 后缀自动机
- 搭建Spring4.1与Spring4.2 websock+stomp+activeMQ需要注意事项:spring4不同版本websocket差异
- 爬虫开始例子
- pg查询时间间隔(timestamp类型)
- bzoj2946公共串
- 经商之道
- 2016 Winter Training Day #1_B题_codefcrces 588A(贪心)
- linux字符设备驱动之LED
- POJ 1099 Square Ice
- Android 下收发input事件的工具 getevent 和 sendevent
- iOS AFNetworking 图片上传(修改用户头像功能)