diff --git a/Hunter.io/Hunter.io_Find_email.ipynb b/Hunter.io/Hunter.io_Find_email.ipynb
index 7acf345e72..7f5707ab50 100644
--- a/Hunter.io/Hunter.io_Find_email.ipynb
+++ b/Hunter.io/Hunter.io_Find_email.ipynb
@@ -8,7 +8,7 @@
"tags": []
},
"source": [
- "
"
+ "
"
]
},
{
@@ -20,7 +20,7 @@
},
"source": [
"# Hunter.io - Find email\n",
- "Give Feedback | Bug report"
+ "Give Feedback | Bug report"
]
},
{
@@ -93,7 +93,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": null,
"id": "353ef79c",
"metadata": {
"papermill": {},
@@ -119,10 +119,7 @@
{
"cell_type": "markdown",
"id": "b69f38ae-a69c-4360-8cf9-099cda04f098",
- "metadata": {
- "papermill": {},
- "tags": []
- },
+ "metadata": {},
"source": [
"- `domain_name`: company name\n",
"- `api_key`: token to get data through hunter.io"
@@ -130,7 +127,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": null,
"id": "01647a55",
"metadata": {
"papermill": {},
@@ -139,7 +136,9 @@
"outputs": [],
"source": [
"domain_name = \"naas.ai\"\n",
- "api_key = \"899fa50c3a6c56e8b19e37608140f327bf9xxxxx\""
+ "api_key = \"899fa50c3a6c56e8b19e37608140f327bf9xxxxx\"\n",
+ "first_name = \"florent\"\n",
+ "last_name = \"ravenel\""
]
},
{
@@ -156,20 +155,16 @@
{
"cell_type": "markdown",
"id": "ebfad846-2a68-4855-909c-1b2a9a7bcfa5",
- "metadata": {
- "papermill": {},
- "tags": []
- },
+ "metadata": {},
"source": [
"### Save to pickle"
]
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": null,
"id": "187ace2f-4049-4e55-b856-a955add1bfd4",
"metadata": {
- "papermill": {},
"tags": []
},
"outputs": [],
@@ -183,27 +178,24 @@
{
"cell_type": "markdown",
"id": "7537ee02-afad-4d87-8883-afae67365f46",
- "metadata": {
- "papermill": {},
- "tags": []
- },
+ "metadata": {},
"source": [
"### Find emails"
]
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": null,
"id": "bb42b49d-b53e-4255-8a59-c824cd49aeac",
"metadata": {
- "papermill": {},
"tags": []
},
"outputs": [],
"source": [
"def domain_search(domain, api_key):\n",
- " url = f\"https://api.hunter.io/v2/domain-search?domain={domain}&api_key={api_key}\"\n",
+ " url = f\"https://api.hunter.io/v2/email-finder?domain=reddit.com&first_name={first_name}&last_name={last_name}n&api_key={api_key}\"\n",
" response = requests.get(url)\n",
+ "\n",
" \n",
" if response.status_code == 200:\n",
" data = response.json()\n",
@@ -211,8 +203,7 @@
"\n",
" # Extract emails from the response\n",
" if 'data' in data:\n",
- " for email in data['data']['emails']:\n",
- " emails.append(email['value'])\n",
+ " emails.append(data['data']['email'])\n",
" \n",
" # Save emails to pickle file\n",
" save_to_pickle(emails, f\"{domain}_emails.pickle\")\n",
@@ -220,7 +211,8 @@
" else:\n",
" return {\"error\": \"No data found\"}\n",
" else:\n",
- " return {\"error\": f\"Error {response.status_code}: {response.json().get('errors', 'Unknown error')}\"}"
+ " return {\"error\": f\"Error {response.status_code}: {response.json().get('errors', 'Unknown error')}\"}\n",
+ " "
]
},
{
@@ -237,20 +229,16 @@
{
"cell_type": "markdown",
"id": "8b6ecf57-fec4-4e72-a7b8-4985bca76c05",
- "metadata": {
- "papermill": {},
- "tags": []
- },
+ "metadata": {},
"source": [
"### Display result"
]
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": null,
"id": "5182d09a-e6d7-4d9d-9f38-eb3a9ce87cf1",
"metadata": {
- "papermill": {},
"tags": []
},
"outputs": [],
@@ -258,6 +246,14 @@
"domain_search_result = domain_search(domain_name, api_key)\n",
"domain_search_result"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "6a1d5634-fe3b-4fbd-aef7-b258c20a8d25",
+ "metadata": {},
+ "outputs": [],
+ "source": []
}
],
"metadata": {
@@ -279,8 +275,8 @@
"version": "3.9.6"
},
"naas": {
- "notebook_id": "29b357b7e5487a12133180f7f41dd8b330732ea9d4f1c3892eaae3f389bffd75",
- "notebook_path": "Hunter.io/Hunter.io_Find_email.ipynb"
+ "notebook_id": "b8a92a0e4b6e40db304564f999566443fb35e93df716ab4be5021aabba8230ee",
+ "notebook_path": "GitHub/GitHub_Add_new_issues_as_page_in_Notion_database.ipynb"
},
"papermill": {
"default_parameters": {},
@@ -291,4 +287,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
-}
\ No newline at end of file
+}