[Pywikipedia-bugs] [ pywikipediabot-Bugs-2819291 ] 'template' exception in wikipedia.replaceExcept() isn't good

SourceForge.net noreply at sourceforge.net
Mon Oct 24 19:24:09 UTC 2011


Bugs item #2819291, was opened at 2009-07-10 00:31
Message generated for change (Settings changed) made by xqt
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2819291&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
>Priority: 7
Private: No
Submitted By: NeuCeu (neuceu)
Assigned to: Nobody/Anonymous (nobody)
Summary: 'template' exception in wikipedia.replaceExcept() isn't good

Initial Comment:
Version: 
Pywikipedia [http] trunk/pywikipedia (r7032, Jul 08 2009, 03:18:37)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]

Because of the 'template' exception, large part of a page text can be ignored.
How to reproduce : run replace.py on fr.wiki with page "Slayers" and exeption 'template'
python replace.py -exceptinsidetag:template -regex "([Aa])ncêtre" "\1ncêetre" -namespace:0 -page:"Slayers"

It should normally find something to replace.

Possible fix : If I remove (?s) in front of the 'template' regex, it works. IMHO I would replace the .* by [^}]*


----------------------------------------------------------------------

Comment By: xqt (xqt)
Date: 2011-05-12 23:24

Message:
see also bug #3158761

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2819291&group_id=93107



More information about the Pywikipedia-bugs mailing list