06 2018 档案

爬虫的学习过程——会更新
摘要:一、爬虫的基本过程 1、发起请求 通过HTTP库向目标网站发起请求,即发送一个Request,请求包含额外的headers内容,等待服务器相应。 2、获得相应内容 如果服务器能正常响应,会得到一个Response,Response的内容便是所要获取的页面内容,类型可能有HTML,Json字符串,二进 阅读全文

posted @ 2018-06-13 18:44 本空空 阅读(84) 评论(0) 推荐(0)

python第一个爬虫脚本
摘要:import urllib.requestimport reimport os url = "http://www.budejie.com/" # 爬的地址 def get_page(url): page = urllib.request.urlopen(url).read() # 获取到该地址的所 阅读全文

posted @ 2018-06-02 22:18 本空空 阅读(197) 评论(0) 推荐(0)

导航