Python bs4-美化组,类型错误:';非类型';对象不可调用
为什么我会犯这个错误?(我知道这个问题缺少很多细节,但我赶时间,而且我的代码非常简单,如果有人帮助我,我会非常感激)Python bs4-美化组,类型错误:';非类型';对象不可调用,python,html,python-3.x,web-scraping,beautifulsoup,Python,Html,Python 3.x,Web Scraping,Beautifulsoup,为什么我会犯这个错误?(我知道这个问题缺少很多细节,但我赶时间,而且我的代码非常简单,如果有人帮助我,我会非常感激) TypeError回溯(最近一次调用) 在里面 1页\u soup=BeautifulSoup(第\u html页,'html.parser') ---->2资产负债表=page_soup.findALL(“div”,{“id”:“row10jqxgrid”}) 3资产负债表 TypeError:“非类型”对象不可调用 在你的代码中,你已经用大写字母写了findAll。 写fi
TypeError回溯(最近一次调用)
在里面
1页\u soup=BeautifulSoup(第\u html页,'html.parser')
---->2资产负债表=page_soup.findALL(“div”,{“id”:“row10jqxgrid”})
3资产负债表
TypeError:“非类型”对象不可调用
在你的代码中,你已经用大写字母写了findAll。
写findAll而不是findAll
balance_sheet = page_soup.findAll("div",{"id":"row10jqxgrid"})
你检查过
page\u-soup
的值吗?page\u-soup可以正常工作。find\u all
但是我认为这个元素是用JS动态生成的。你可以编辑这个问题来询问这个问题,并修正错误。好的,谢谢,我会记住的
TypeError Traceback (most recent call last)
<ipython-input-81-6a2377c6bfca> in <module>
1 page_soup = BeautifulSoup(page_html, 'html.parser')
----> 2 balance_sheet = page_soup.findALL("div",{"id":"row10jqxgrid"})
3 balance_sheet
TypeError: 'NoneType' object is not callable
balance_sheet = page_soup.findALL("div",{"id":"row10jqxgrid"})
balance_sheet = page_soup.findAll("div",{"id":"row10jqxgrid"})