摘要:        
python爬虫下载文件 下载东西和访问网页差不多,这里以下载我以前做的一个安卓小游戏为例 地址为:http://hjwachhy.site/game/only_v1.1.1.apk 首先下载到内存 # coding: UTF-8 import requests url="http://hjwach    阅读全文
posted @ 2018-01-12 22:30
philhuan
阅读(29173)
评论(3)
推荐(0)
        
            
        
        
摘要:        
python爬虫小例子 python爬虫小实例 一个带异常处理的小例子 代码如下: import requests url="http://www.cnblogs.com/hjw1" try: r=requests.get(url) r.raise_for_status() print r.enco    阅读全文
posted @ 2018-01-12 21:45
philhuan
阅读(32975)
评论(1)
推荐(0)
        
            
        
        
摘要:        
python爬虫-Response对象 r=requests.get("http://www.baidu.com/") 属性 r.status_code http请求的返回状态,200表示连接成功,404表示连接失败 r.text http响应内容的字符串形式,url对应的页面内容 r.encodi    阅读全文
posted @ 2018-01-12 00:40
philhuan
阅读(22032)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号