@staticmethod
    def load_page(key):
        print("Loading %s" % key)
        try:
            raw = wikipedia.page(key, preload=True)
            print(unidecode(raw.content[:80]))
            print(unidecode(str(raw.links)[:80]))
            print(unidecode(str(raw.categories)[:80]))
        except __HOLE__:
            print("Key error")
            raw = None
        except wikipedia.exceptions.DisambiguationError:
            print("Disambig error!")
            raw = None
        except wikipedia.exceptions.PageError:
            print("Page error!")
            raw = None
        except ReadTimeout:
            # Wait a while, see if the network comes back
            print("Connection error, waiting 10 minutes ...")
            sleep(600)
            print("trying again")
            return self[key]
        except ConnectionError:
            # Wait a while, see if the network comes back
            print("Connection error, waiting 10 minutes ...")
            sleep(600)
            print("trying again")
            return self[key]
        except ValueError:
            # Wait a while, see if the network comes back
            print("Connection error, waiting 10 minutes ...")
            sleep(600)
            print("trying again")
            return self[key]
        except WikipediaException:
            # Wait a while, see if the network comes back
            print("Connection error, waiting 10 minutes ...")
            sleep(600)
            print("trying again")
            return load_page(key)
        return raw
dataset/ETHPy150Open Pinafore/qb/util/cached_wikipedia.py/CachedWikipedia.load_page