def print_version(self, url): for a in self.index_to_soup(url).findAll('a', href=re.compile(r'print\.story'): if 'Print' in a.string: return 'http://www.orlandosentinel.com' + a['href'] return url