Revision: 7450 Author: xqt Date: 2009-10-13 17:40:08 +0000 (Tue, 13 Oct 2009)
Log Message: ----------- next_text.parent.has_key('href'), revert r7336 (bug #2877789)
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2009-10-13 14:01:31 UTC (rev 7449) +++ trunk/pywikipedia/wikipedia.py 2009-10-13 17:40:08 UTC (rev 7450) @@ -1305,7 +1305,7 @@ convertEntities=BeautifulSoup.HTML_ENTITIES, parseOnlyThese=content) next_text = body.find(text=nextpattern) - if next_text is not None and 'href' in next_text: + if next_text is not None and next_text.parent.has_key('href'): path = next_text.parent['href'].replace("&", "&") else: path = ""