Revision: 4529 Author: rotem Date: 2007-11-11 13:53:05 +0000 (Sun, 11 Nov 2007)
Log Message: ----------- Check parent, not text.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-11-11 13:51:14 UTC (rev 4528) +++ trunk/pywikipedia/wikipedia.py 2007-11-11 13:53:05 UTC (rev 4529) @@ -1011,7 +1011,7 @@ convertEntities=BeautifulSoup.HTML_ENTITIES, parseOnlyThese=content) next_text = body.find(text=nextpattern) - if next_text is not None and next_text.has_key('href'): + if next_text is not None and next_text.parent.has_key('href'): path = next_text.parent['href'].replace("&", "&") else: path = ""