电子邮件猎人rest api客户端
email_hunter_python的Python项目详细描述
安装
要求:
- Python3(因为现在是2015年)
要安装:
pip install email-hunter-python
要更新:
pip install --upgrade email-hunter-python
用法
email_hunter_python支持Email Hunterapi的三种主要方法:search, generate,和exist。有两种使用方法 电子邮件:hunter python:
- 作为一个python库
- 作为命令行(CLI)工具
使用email_hunter_python python库:
导入客户端并将其实例化:
fromemail_hunterimportEmailHunterClient
client = EmailHunterClient('my_api_key')
您可以搜索:
client.search('google.com')
最多返回100个结果,因此使用偏移量分页:
client.search('google.com',offset=1)
您还可以更改类型(个人或通用):
client.search('google.com',type='personal')
您可以生成:
client.generate('google.com','Sergey','Brin')
你可以检查电子邮件是否存在:
client.exist('sergey@google.com')
使用email_hunter_python作为cli工具:
email_hunter [command name] [api_key] [other args]
命令名为search、generate或exist,即api密钥 API密钥是否与您的电子邮件猎人帐户关联
其他参数取决于您使用的命令:
--domain Required for search and generate commands --offset Optional, used with search command. --type Optional, used with search command --first_name Required for generate command --last_name Required for generate command --email Required for exist command --file Path to a CSV to be used with the specified command. CSV must have a column for each argument used.
当您要对 同一类型。例如,如果您想查找 一个组织中的几个人您可以执行以下操作:
email_hunter generate [api_key] --file people.csv > emails.csv
其中people.csv看起来像:
domain,first_name,last_name google.com,larry,page google.com,sergey,brin facebook.com,mark,zuckerberg
输出也将采用CSV格式
许可证
版权所有©2015 Alan Vezina
根据MIT许可证(MIT)发布,详细信息请参见许可证文件