蜜罐项目httpbl python

蜜罐项目httpbl python,python,jupyter-notebook,python-import,Python,Jupyter Notebook,Python Import,我正在尝试使用python API检查IP地址的信誉。但当我在jupyter笔记本上尝试时: import httpbl ip_address = '188.37.87.45' key = '*****' bl = httpbl.HttpBL(key) response = bl.query(ip_address) print "IP Address: %s" % ip_address print "Threat Score: %i" % response['threat_score'] p

我正在尝试使用python API检查IP地址的信誉。但当我在jupyter笔记本上尝试时:

import httpbl
ip_address = '188.37.87.45'
key = '*****'

bl = httpbl.HttpBL(key)
response = bl.query(ip_address)

print "IP Address: %s" % ip_address
print "Threat Score: %i" % response['threat_score']
print "Days since last activity: %i" % response['days_since_last_activity']
print "Visitor type: %s" % ', '.join([httpbl.DESCRIPTIONS[type_] \
                                      for type_ in response['type']])
我得到以下错误:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-2225af148800> in <module>()
----> 1 from httpbl import HttpBL
      2 ip_address = '188.37.87.45'
      3 key = '*****'
      4 
      5 bl = httpbl.HttpBL(key)

~/anaconda3/lib/python3.6/site-packages/httpbl/__init__.py in <module>()
      5 __version__ = 0, 0, 3
      6 
----> 7 from httpbl import HttpBL
      8 
      9 # Response constants

ImportError: cannot import name 'HttpBL'
---------------------------------------------------------------------------
ImportError回溯(最近一次呼叫最后一次)
在()
---->1从httpbl进口httpbl
2 ip_地址='188.37.87.45'
3键='*****'
4.
5 bl=httpbl.httpbl(键)
~/anaconda3/lib/python3.6/site packages/httpbl/\uuuuu init\uuuuuuuuu.py in()
5版本=0,0,3
6.
---->7从httpbl进口httpbl
8.
9#响应常数
ImportError:无法导入名称“HttpBL”

有什么解决方案吗?

我认为问题在于我使用的是python 3。这是python 3的问题。不久将发布0.4。