I'm using ftplib's FTP class to connect to ftp://emi.nasdaq.com. Using the domain doesn't work, but using FileZilla I can see the IP address the domain name resolves to, and the IP address works.
def main():
print("Grabbing data...")
with FTP() as ftp:
ftp.connect('ftp://emi.nasdaq.com', 21)
Specifically, the domain throws a GAIError ([Errno 11001] getaddrinfo failed). I'm using Python 3.8. How can I resolve the domain to its IP before passing it to the FTP class?