Revision: 6682 Author: nicdumz Date: 2009-04-23 07:31:29 +0000 (Thu, 23 Apr 2009)
Log Message: ----------- Fixing pagelanglinks Link object creation: source has to be the Site where the link is found, not the Site to which the link points to.
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2009-04-23 06:56:41 UTC (rev 6681) +++ branches/rewrite/pywikibot/site.py 2009-04-23 07:31:29 UTC (rev 6682) @@ -1381,8 +1381,9 @@ if 'langlinks' not in pageitem: continue for linkdata in pageitem['langlinks']: - yield pywikibot.Link(linkdata['*'], - source=pywikibot.Site(linkdata['lang'])) + yield pywikibot.Link('%s:%s' % (linkdata['lang'], + linkdata['*']), + source=self)
def page_extlinks(self, page): """Iterate all external links on page, yielding URL strings."""