- #coding=utf-8
- import urllib
- url = "http://www.shashou47.com/category/server/linux-centos/"
- html = urllib.urlopen(url).read()
- import re
- res_tr1 = r'<a href="(.*?)#respond"'
- m_th1 = re.findall(res_tr1,html)
- for mm in m_th1:
- print mm
- res_tr2 = r' rel="bookmark">(.*?)</a></h2>'
- m_th2 = re.findall(res_tr2,html)
- for mm in m_th2:
- print unicode(mm,'utf-8')
2017-02-24 10:04 沙发
你也再学python呀
2017-03-05 17:23 1层
@wei 准备搞树莓派的