Ticket #3088: 0001-Follow-redirects-properly-SL-3088.patch

File 0001-Follow-redirects-properly-SL-3088.patch, 1.2 KB (added by humitos, 11 years ago)
  • infoslicer/processing/MediaWiki_Helper.py

    From 80b0fcbe00f05bd97a51f86319108a800c4cab1b Mon Sep 17 00:00:00 2001
    Message-Id: <80b0fcbe00f05bd97a51f86319108a800c4cab1b.1337179016.git.humitos@gmail.com>
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Wed, 16 May 2012 11:36:41 -0300
    Subject: [PATCH InfoSlicer] Follow redirects properly SL #3088
    
    Handle wiki redirection properly using the same wiki engine that the
    user used for his query.
    
    Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
    ---
     infoslicer/processing/MediaWiki_Helper.py |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/infoslicer/processing/MediaWiki_Helper.py b/infoslicer/processing/MediaWiki_Helper.py
    index 3e07dbb..360aba0 100644
    a b class MediaWiki_Helper: 
    7070            return title
    7171        #if there is a redirect, recursively follow the chain
    7272        else:
    73             return self.resolveTitle(redirectList[0].attributes["to"].value)
     73            return self.resolveTitle(redirectList[0].attributes["to"].value, wiki=wiki)
    7474   
    7575    def resolveRevision(self, revision, wiki=defaultWiki):
    7676        """ get an article by revision number.