怎样用BeautifulSoup提取java提取html标签内容文字内容后的注释

python BeautifulSoup 抓取网页内指定内容
我的图书馆
python BeautifulSoup 抓取网页内指定内容
python&BeautifulSoup&抓取网页内指定内容
代码片段(1)
1.&[代码][Python]代码&&&&
?12345678910111213141516171819# _*_ coding:utf-8 _*_#xiaohei.python.seo.call.me:)#win+python2.7.ximport urllib2from bs4 import BeautifulSoupdef jd(url):&&&&page = urllib2.urlopen(url)&&&&html_doc = page.read()&&&&soup = BeautifulSoup(html_doc.decode('gb2312','ignore'))&&&&for i in soup.find_all('div', id="sortlist"):&&&&&&&&one = i.find_all('a')&&&&&&&&two = i.find_all('li')&&&&&&&&print ("%s %s" % (one,two))jd("/computer.html")
TA的最新馆藏
喜欢该文的人也喜欢160被浏览17843分享邀请回答0添加评论分享收藏感谢收起14被浏览3264分享邀请回答02 条评论分享收藏感谢收起

我要回帖

更多关于 php提取标签内容img 的文章

 

随机推荐