摘要: handle_excpetion.pyfrom urllib.request import urlopenfrom urllib.error import HTTPErrorfrom bs4 import BeautifulSoupimport sysdef getLogo(url): try... 阅读全文
posted @ 2015-09-16 15:54 Master HaKu 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 目标:我们解析百度首页的logobs_baidu_logo.pyfrom urllib.request import urlopenfrom bs4 import BeautifulSouphtml = urlopen("http://www.baidu.com")bsObj = Beautiful... 阅读全文
posted @ 2015-09-16 11:27 Master HaKu 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1. 安装Beautiful Soup下载地址http://www.crummy.com/software/BeautifulSoup/bs4/download/4.4/解压后,进入根目录控制台下运行:python setup.py install运行结果:Processing dependenci... 阅读全文
posted @ 2015-09-16 11:17 Master HaKu 阅读(309) 评论(0) 推荐(0) 编辑