Hacker News new | ask | show | jobs
by ploxiln 2390 days ago
yup, I've used stdlib urlopen in an assortment of scripts, it works, even with python2/python3 cross compatibility:

    if sys.version_info[0] == 2:
        from urllib2 import urlopen, Request  # python2
    else:
        from urllib.request import urlopen, Request  # python3