So, I'm trying out a new project right now (the project is to verify emails). And I'm using the bulk-email-verifier library on google colab. The problem is that the code is wonky and I can't find any official documentation to make the code less wonky beside the two main site - (site 1, site 2
The first issue is the download. The script is suppose to read a csv, verify it, and then download the result back into my local device. But the download doesn't work most of the time (it just returns an empty csv). Basically, I have to run the first line multiple times for a chance that the second line can download the right thing.
#code to get request - taken from site
client.download(filename='emails.csv', request_id=request_id)
#download csv
from google.colab import files
files.download('emails.csv')
The second problem is the results itself. The results aren't constant. I have some fake email, some generated by email generator, and some real. The fake email are fine, but the real email is not constant. The real email consist of work and personal emails. And the results keeps on returning as either - true or smtp-failed. Is this because of the library itself, or did I write something wrong?
#[make free account here to get api key if u want](https://emailverification.whoisxmlapi.com/bulk-api/integrations/developer-libraries/python)
pip install bulk-email-verifier
from bulkemailverifier import *
client = Client('API Key')
import pandas as pd
import numpy as np
from google.colab import files
upload = files.upload()
file = pd.read_csv('email_test.csv')
file.head(15)
file.info()
files = file['email'].tolist()
request_id = client.create_request(emails = files)
result = client.get_status(request_ids = [request_id])
print (result)
completed = client.get_records(request_id=request_id)
failed = client.get_records(request_id=request_id, return_failed=True)
result = client.get_requests()
print(result)
#code to get request - taken from site
client.download(filename='emails.csv', request_id=request_id)
#download csv
from google.colab import files
files.download('emails.csv')