Skip to content

Commit

Permalink
Merge branch 'master' into 2559-instagram-extract-details-from-account
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Jul 29, 2024
2 parents f1a92ae + 9595397 commit 09bc9bf
Show file tree
Hide file tree
Showing 8 changed files with 604 additions and 669 deletions.
48 changes: 24 additions & 24 deletions .github/push_templates_to_algolia.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"id": "aa0e3e6f-1260-4452-8abf-7c084e26c8a4",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-03T09:45:44.194588Z",
"iopub.status.busy": "2024-07-03T09:45:44.194386Z",
"iopub.status.idle": "2024-07-03T09:45:44.268184Z",
"shell.execute_reply": "2024-07-03T09:45:44.267632Z"
"iopub.execute_input": "2024-07-29T07:50:08.138034Z",
"iopub.status.busy": "2024-07-29T07:50:08.137743Z",
"iopub.status.idle": "2024-07-29T07:50:08.212986Z",
"shell.execute_reply": "2024-07-29T07:50:08.212430Z"
},
"papermill": {},
"tags": []
Expand Down Expand Up @@ -95,10 +95,10 @@
"id": "cfa97168-63eb-4e8c-89c3-0a5d26f47740",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-03T09:45:44.271024Z",
"iopub.status.busy": "2024-07-03T09:45:44.270602Z",
"iopub.status.idle": "2024-07-03T09:45:44.273855Z",
"shell.execute_reply": "2024-07-03T09:45:44.273264Z"
"iopub.execute_input": "2024-07-29T07:50:08.215819Z",
"iopub.status.busy": "2024-07-29T07:50:08.215433Z",
"iopub.status.idle": "2024-07-29T07:50:08.218724Z",
"shell.execute_reply": "2024-07-29T07:50:08.218142Z"
},
"papermill": {},
"tags": []
Expand Down Expand Up @@ -141,10 +141,10 @@
"id": "7a9c86c2-931d-4113-abbc-31b3f517b6c4",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-03T09:45:44.276466Z",
"iopub.status.busy": "2024-07-03T09:45:44.276098Z",
"iopub.status.idle": "2024-07-03T09:45:44.359615Z",
"shell.execute_reply": "2024-07-03T09:45:44.358892Z"
"iopub.execute_input": "2024-07-29T07:50:08.221325Z",
"iopub.status.busy": "2024-07-29T07:50:08.221149Z",
"iopub.status.idle": "2024-07-29T07:50:08.303661Z",
"shell.execute_reply": "2024-07-29T07:50:08.302982Z"
},
"tags": []
},
Expand Down Expand Up @@ -178,10 +178,10 @@
"id": "c50e96b2-4403-413c-a99a-9243be0c0a04",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-03T09:45:44.362474Z",
"iopub.status.busy": "2024-07-03T09:45:44.362118Z",
"iopub.status.idle": "2024-07-03T09:45:45.897228Z",
"shell.execute_reply": "2024-07-03T09:45:45.896527Z"
"iopub.execute_input": "2024-07-29T07:50:08.306342Z",
"iopub.status.busy": "2024-07-29T07:50:08.306144Z",
"iopub.status.idle": "2024-07-29T07:50:08.875987Z",
"shell.execute_reply": "2024-07-29T07:50:08.875356Z"
},
"tags": []
},
Expand Down Expand Up @@ -230,10 +230,10 @@
"id": "da661ba3-fd15-4abc-bd4f-d13ae77b82b0",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-03T09:45:45.900059Z",
"iopub.status.busy": "2024-07-03T09:45:45.899631Z",
"iopub.status.idle": "2024-07-03T09:45:48.132731Z",
"shell.execute_reply": "2024-07-03T09:45:48.132061Z"
"iopub.execute_input": "2024-07-29T07:50:08.878692Z",
"iopub.status.busy": "2024-07-29T07:50:08.878483Z",
"iopub.status.idle": "2024-07-29T07:50:09.735273Z",
"shell.execute_reply": "2024-07-29T07:50:09.734630Z"
},
"tags": []
},
Expand All @@ -260,10 +260,10 @@
"id": "f1482a8f-4ce5-4e04-93c8-ddd883375d67",
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-03T09:45:48.135654Z",
"iopub.status.busy": "2024-07-03T09:45:48.135186Z",
"iopub.status.idle": "2024-07-03T09:45:48.247197Z",
"shell.execute_reply": "2024-07-03T09:45:48.246546Z"
"iopub.execute_input": "2024-07-29T07:50:09.737907Z",
"iopub.status.busy": "2024-07-29T07:50:09.737525Z",
"iopub.status.idle": "2024-07-29T07:50:09.848518Z",
"shell.execute_reply": "2024-07-29T07:50:09.847916Z"
},
"tags": []
},
Expand Down
34 changes: 24 additions & 10 deletions Hunter.io/Hunter.io_Find_email.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "353ef79c",
"metadata": {
"papermill": {},
Expand Down Expand Up @@ -130,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "01647a55",
"metadata": {
"papermill": {},
Expand All @@ -139,7 +139,9 @@
"outputs": [],
"source": [
"domain_name = \"naas.ai\"\n",
"api_key = \"899fa50c3a6c56e8b19e37608140f327bf9xxxxx\""
"api_key = \"899fa50c3a6c56e8b19e37608140f327bf9xxxxx\"\n",
"first_name = \"florent\"\n",
"last_name = \"ravenel\""
]
},
{
Expand All @@ -166,7 +168,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "187ace2f-4049-4e55-b856-a955add1bfd4",
"metadata": {
"papermill": {},
Expand All @@ -193,7 +195,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "bb42b49d-b53e-4255-8a59-c824cd49aeac",
"metadata": {
"papermill": {},
Expand All @@ -202,25 +204,26 @@
"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",
" emails = []\n",
"\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",
" return emails\n",
" 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",
" "
]
},
{
Expand All @@ -247,7 +250,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "5182d09a-e6d7-4d9d-9f38-eb3a9ce87cf1",
"metadata": {
"papermill": {},
Expand All @@ -258,6 +261,17 @@
"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": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 09bc9bf

Please sign in to comment.