Python 类型错误:';非类型';对象不可调用

Python 类型错误:';非类型';对象不可调用,python,beautifulsoup,Python,Beautifulsoup,我有个错误 File "logins3", line 17, in <module> my_inputs = soup.findall('input') TypeError: 'NoneType' object is not callable 信息 <input type="hidden" name="return" value="ovL2FuaW1lZGlnaXRhbG5ldHdvcmsuZZXgucGhwL2Nvbm5leGlvbg==" /> &l

我有个错误

File "logins3", line 17, in <module>
    my_inputs = soup.findall('input')
TypeError: 'NoneType' object is not callable
信息

<input type="hidden" name="return" value="ovL2FuaW1lZGlnaXRhbG5ldHdvcmsuZZXgucGhwL2Nvbm5leGlvbg==" />
    <input type="hidden" name="8d900dda34d7a3d37252b4a3c8" value="1" />

我需要这个令牌来创建我的脚本,我不知道如何修复它

这是一个打字错误

您打算使用而不是
findall()



仅供参考,这里的
AttributeError
没有失败,因为
BeautifulSoup
中的点符号有一个特殊的含义-
soup.findall
基本上是
soup.find(“findall”)的快捷方式。换句话说,它试图找到一个名为
findall
的元素,但失败并返回
None
。这就是为什么
'NoneType'对象不可调用的原因

您需要在
汤中的
a
之前使用
。findall

my_inputs = soup.find_all('input')

my_inputs = soup.find_all('input')
>>> my_inputs = soup.findAll('input')
>>> for in_put in my_inputs:
        print in_put.name , in_put['value']


input ovL2FuaW1lZGlnaXRhbG5ldHdvcmsuZZXgucGhwL2Nvbm5leGlvbg==
input 1