小编Obe*_*ron的帖子

beautifulsoup findAll find_all

我想用Python解析一个html文件,我使用的模块是beautifulsoup.

在我使用它之后,发生了一些奇怪的事情.据说函数"find_all"是

和"findAll"一样,但我已经尝试过了.但它是不同的.

有谁能告诉我不同​​的?

import urllib, urllib2, cookielib
from BeautifulSoup import *
site = "http://share.dmhy.org/topics/list?keyword=TARI+TARI+team_id%3A407"

rqstr = urllib2.Request(site)
rq = urllib2.urlopen(rqstr)
fchData = rq.read()

soup = BeautifulSoup(fchData)

t = soup.findAll('tr')
Run Code Online (Sandbox Code Playgroud)

python beautifulsoup html-parsing xml-parsing

22
推荐指数
2
解决办法
2万
查看次数

标签 统计

beautifulsoup ×1

html-parsing ×1

python ×1

xml-parsing ×1