Accessing URLs from a list in Python
Question: I'm trying to search a HTML document for links to articles, store them into a
list and then use that list to search each one individually for their titles.


Answer: It's possibly not direct answer for OP, but should not considered as off-
topic: **You should not parse web page for the html data**.

html web pages are not optimized to answer for a lot of requests, especially
requests not from browsers. A lot of generated traffic could made servers
overloaded and trigger DDOS.

So you need try to found any available API for interesting your site and only
if nothing relative found, use parsing of web content with using cache of
request to not overload target resource.

At the first look, `The Guardian` have [Open API](http://open-
platform.theguardian.com/) with [documentation](http://open-
platform.theguardian.com/documentation/) how to use.

Using that API you could work with site content in simply manner, making you
interesting requests more easier and answers available without parsing.

For example, search by tag "technology" [api
output](http://content.guardianapis.com/search?q=technology&api-key=test):

    
    
    from urllib.request import urlopen, URLError, HTTPError
    import json
    import sys
    
    def safeprint(s):
      try:
        print(s)
      except UnicodeEncodeError:
        if sys.version_info >= (3,):
          print(s.encode('utf8').decode(sys.stdout.encoding))
        else:
          print(s.encode('utf8'))
    
    
    url = "http://content.guardianapis.com/search?q=technology&api-key=test"
    
    try:
      content = urlopen(url).read().decode("utf-8")
      json_data = json.loads(content)
      if "response" in json_data and "results" in json_data["response"]:
        for item in json_data["response"]["results"]:
          safeprint(item["webTitle"])
    except URLError as e:
      if isinstance(e, HTTPError):
        print("Error appear: " + str(e))
      else:
        raise e
    

Using that way you could walk through all publications in deep without any
problem.

