I'm terribly sorry if this is unacceptable or answered elsewhere, but I've spent the last hour and a half looking for information on it, and have come up with nothing I can use. I'm brand spanking new to Python and have been given an assignment to pull an IP from a site. I'm able to get my program to read the site, but I'm simply unable to figure out what to do next. Every answer that remotely comes close to what I want is beyond my programming capabilities to the point that I just don't understand it, and tutorials don't actually get at the specific problem I'm having. Again, if there's any document or text I can read instead of wasting time, please send me that way.
import urllib.request
site = urllib.request.urlopen("http://homer.wcitac.org/~sec290/hwk2/")
print (site.read())
IP = site[10]
print (IP)
I know, it's simplistic, but I've only been doing this for a little while. As far as I can tell, it should print back the 10th (9th on the page) character so I have a starting point, so I can then use a colon to find the characters I want, but it's giving me "TypeError: 'HTTPResponse' object does not support indexing", and I've no idea what that means.