A tiny python wrapper for the Email Hunter API. Seriously. It's tiny.
In most cases the primary usage will be executing searches on a domain.
>>> import punter
>>> s = punter.search('d08d2ba22218d1b59df239d03fc5e66adfaec2b2', 'stripe.com')
>>> s['status']
u'success'
>>> s['results']
164
>>> s['emails']
[{
"status": "success",
"results": 164,
"webmail": false,
"pattern": "{first}"
"offset": 0,
"emails": [
{
"value": "[email protected]",
"type": "personal",
"sources": [
{
"domain": "stripe.com",
"uri": "https://stripe.com/blog/weekly-and-monthly-transfers",
"extracted_on": "2015-03-05"
}
]
},
...
]
}]
Want to do an email search? Essentially the same deal.
>>> import punter
>>> s = punter.search('d08d2ba22218d1b59df239d03fc5e66adfaec2b2', '[email protected]')
>>> s['status']
u'success'
>>> s['exist']
True
>>> s['email']
u'[email protected]'
>>> s['emails']
[{
u'domain': u'mpora.com',
u'extracted_on': u'2015-04-27',
u'uri': u'http://mpora.com/tags/wolfgang-wildner'
}]
$ pip install punter
There's always room for improvement.
- More Pythonic!
- Tighten up the exception handling
- Tox configuration
- Perhaps make a cli (new project?)
Copyright © 2015 Joshua Goodlett
Released under the MIT License (MIT)