import urllib.request as urllib2response = urllib2.urlopen('https://wordpress.org/plugins/about/readme.txt')data = response.read()print(data)
import urllib.request as urllib2 # the lib that handles the url stuffdata = urllib2.urlopen(target_url)# it's a file like object and works just like a filefor line in data:# files are iterableprint line