python-duckduckgo
python-duckduckgo copied to clipboard
Update the package to Python 3
You literaly just need to replace only one line ! This line:
import urllib2
Need to be replaced by this line:
import urllib.request as urllib2
If you want that Python2 and Python3 are supported, replace the import urllib2
line by:
import sys
if int(sys.version_info[0]) > 2:
import urllib.request as urllib2
else:
import urllib2
Please, change this in the code, then republish the package on PyPI. Thanks !