https://bugzilla.wikimedia.org/show_bug.cgi?id=59578

--- Comment #3 from Bugzilla Bug Importer (valhallasw) 
<wmf.bugconver...@gmail.com> ---
-------------------------------------------------------------------------------
From: drtrigon <dr.tri...@surfeu.ch>
Date: Tue, 14 Sep 2010 16:53:25
-------------------------------------------------------------------------------

Solved in r18: https://fisheye.toolserver.org/changelog/drtrigon/?cs=18

This solution is based on 'action=parse', its 'anchor' and 'byteoffset' values.
The 'anchor' value is critical since it cannot be generated (except by
emulating the wiki parser) local and HAS TO BE REQUESTED. In cases this is not
possible (e.g. because the request fails) a page cannot be separated into
sections and thus has to be processed IN ONE PIECE.

In case the 'byteoffset' is missing or wrong (look e.g. [1]) it will be
generated with help of 'line' and difflib [2]. In rare cases when this does not
work or has problems action=query&prop=revisions with 'rvsection' can be used
for support (this is not implemented yet). The drawback is this will be VERY
SLOW and HIGH TRAFFIC.

It should be obvious that the content of the page (and thus the get) is always
critical.

If any unsolvable problems occur, the page cannot be separated into sections
and thus has to be processed IN ONE PIECE. This cases should be very rare
anyway.

Side note: the issues with <references> tags do not exist anymore.

[1]
http://de.wikipedia.org/w/api.php?action=parse&page=Wikipedia:Testseite&prop=sections
 
[2] http://docs.python.org/library/difflib.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to