Hi Guys,
This is a strange issue i thought i would have no issues with, i'm downloading emails from my account in Python using poplib library.
Code:
![[Image: fS4uwja.jpg]](https://i.imgur.com/fS4uwja.jpg)
The problem is, the long activation link at the top is not being downloaded when i view the console all i see is:
![[Image: 5R534VH.jpg]](https://i.imgur.com/5R534VH.jpg)
That link seems to be missing, it's the same for all test sites i have tried.
Is there something i am doing wrong? when i test in PHP i can download and see the links fine.
Thanks for any help guys.
Graham
This is a strange issue i thought i would have no issues with, i'm downloading emails from my account in Python using poplib library.
Code:
def pop3_downloader(username, password, pop3server, port, use_ssl): """ downloads emails, also deletes after reading ... """ # noinspection PyBroadException try: server = '' if use_ssl == "no": server = poplib.POP3(pop3server, port) elif use_ssl == "yes": server = poplib.POP3_SSL(pop3server, port) else: pass server.user(username) server.pass_(password) numMessages = len(server.list()[1]) print("--> # Of Messages: " + str(numMessages)) email_container = [] for i in range(numMessages): (server_msg, body, octets) = server.retr(i + 1) for j in body: # noinspection PyBroadException try: msg = email.message_from_string(j.decode("utf-8")) email_body = msg.get_payload() print(email_body) email_extract_urls = re.findall(r"https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+", email_body) # email_extract_urls = extract_all_urls_from_html(email_body) if len(email_extract_urls) > 0: email_container.append(email_extract_urls) except Exception: pass # server.dele(i + 1) server.quit() return email_container except Exception: print_exception()This is an example email:
![[Image: fS4uwja.jpg]](https://i.imgur.com/fS4uwja.jpg)
The problem is, the long activation link at the top is not being downloaded when i view the console all i see is:
![[Image: 5R534VH.jpg]](https://i.imgur.com/5R534VH.jpg)
That link seems to be missing, it's the same for all test sites i have tried.
Is there something i am doing wrong? when i test in PHP i can download and see the links fine.
Thanks for any help guys.
Graham