Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3088 closed defect (fixed)

Infoslicer does not tolerate wiki redirects

Reported by: greenfeld Owned by: humitos
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: InfoSlicer Version: 0.93.x
Severity: Unspecified Keywords: 12.1.0, easy-hack
Cc: humitos Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

  1. Start Infoslicer
  2. Attempt to download the Gato article from Spanish Wikipedia (using an Internet connection).
  3. You will get a blank entry. http://es.wikipedia.org/wiki/Gato is only a redirect to http://es.wikipedia.org/wiki/Felis_silvestris_catus , but does not get followed.

Seen in XO-1.75 os43/Infoslicer-9.

Attachments (1)

0001-Follow-redirects-properly-SL-3088.patch (1.2 KB) - added by humitos 8 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by godiard

  • Keywords easy-hack added

comment:2 Changed 8 years ago by godiard

  • Keywords 12.1.0 added

comment:3 Changed 8 years ago by godiard

  • Owner changed from walter to godiard
  • Status changed from new to assigned

comment:4 Changed 8 years ago by humitos

I can reproduce this in Fedora 16 with the git version of the source code.

After typing "Gato" I get a blank screen where it should be the article.

comment:5 Changed 8 years ago by walter

aargh. I am loath to dig into this code... but perhaps the time has come. I still haven't removed the hippo dependency either. :P

comment:6 Changed 8 years ago by godiard

No problem, I think me or humitos can look at this issue.

comment:7 Changed 8 years ago by godiard

  • Owner changed from godiard to humitos

comment:8 Changed 8 years ago by humitos

Take a look at the content of this page:

What should we do?

I saw that there is a library called infoslicer/processing/MediaWiki_Helper.py but it seems to be quite obsolete (Copyright (C) IBM Corporation 2008). I didn't find a webpage pointing to the repository of this library or something like that.

Maybe we should update this API for a newer one:

comment:9 Changed 8 years ago by humitos

There problem was that MediaWiki_Helper was following the redirects but when it was calling the redirect it always used the default wiki (English Wikipedia) so it was falling.

I change this behavior to use the same wiki in every redirect. See the attached patch.

Changed 8 years ago by humitos

comment:10 Changed 8 years ago by humitos

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:11 Changed 8 years ago by humitos

  • Cc humitos added
Note: See TracTickets for help on using tickets.