def get_links(self, page_url: urlopen) -> None: """ Accepts the BeautifulSoup object passed into it, searches for all instances other Pokedex pages (url substrings starting with pokedex-bw) and adds each of the different substrings into a set that will be iterated through in the `visit_page` method. """ poke_list: BeautifulSoup = page_url.find_all( 'option', {'value': re.compile('/pokedex-bw/[0-9]*.shtml')}) for link in poke_list: self.pages.add(link['value'])