TypeError: 'dict' object is not callabled
Traceback (most recent call last): File "/root/Desktop/JuniperBackdoor-master/censys.py", line 13, in <module> for name, series in res.json()["raw_series"].iteritems(): TypeError: 'dict' object is not callable
I just upgraded requests. The version in (current) Debian Stable is ancient.
"Upgrade requests and it works!"
In conclusion:
1.Upgrade your version of requests (pip install -U requests)
2.Make sure your URL returns valid JSON
requests版本太旧,该升级啦(Debian):pip install -U requests
不想升级的话,要写成xx.json的形式,而不能写成xx.json()这种形式,建议升级requests
参考连接:http://stackoverflow.com/questions/14543570/how-to-print-a-variable-with-requests-and-json