emailwhois icon indicating copy to clipboard operation
emailwhois copied to clipboard

updated to python 3

Open arham-sayyed opened this issue 2 years ago • 1 comments

Title: Update code to Python 3 compatibility

Description:

This PR updates the email wildcard lookup script to be compatible with Python 3. Key changes include:

  • Changed shebang to #!/usr/bin/env python3 for better portability.
  • Imported urllib.request as urllib2 to keep consistent variable names.
  • Updated exception handling syntax (Exception, e to Exception as e).
  • Implemented f-string formatting for better string manipulations.
  • Used context managers (with) to handle file operations which ensures proper file closing and exception handling.
  • Updated file opening in "append" mode with line buffering for improved efficiency.

These changes make the script more readable and ensure it will run correctly in a Python 3 environment.

Please review the changes and let me know if there are any concerns or further modifications needed.

arham-sayyed avatar Sep 10 '23 12:09 arham-sayyed

Thanks for doing this update. I honestly didn't know people used this script.

Unfortunately, I think you may need to make more edits for the script to be Python 3 ready AND to work. I'm wondering if you were able to test it after making these updates? I ask because it appears the URL in line 42 no longer works. Perhaps it needs HTTPS?

WebBreacher avatar Sep 13 '23 21:09 WebBreacher