Bugs item #3610806, was opened at 2013-04-13 23:53 Message generated for change (Tracker Item Submitted) made by leeyc0 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610806...
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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: leeyc0 (leeyc0) Assigned to: Nobody/Anonymous (nobody) Summary: yet another bug in extract_templates_and_params()
Initial Comment: I found another bug in extract_templates_and_params() if curly bracket exists inside template.
Below is the code snippet demonstrating the bug
#!/usr/bin/python # -*- coding: utf-8 -*-
# you need to download and configure pywikipedia import sys sys.path = ["/home/yclee/pywikipedia"] + sys.path import wikipedia as pywikibot
# bug: extract_templates_and_params returns empty list pageStr = "{{aaa|name=-{name123}-}}" print pywikibot.extract_templates_and_params(pageStr)
# normal pageStr = "{{aaa|name=name123}}" print pywikibot.extract_templates_and_params(pageStr)
(note: -{XXXXX}- is a special syntax in Chinese wikipedia, which the usage is to inhibit automatic traditional/simplified Chinese conversion)
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610806...
pywikipedia-bugs@lists.wikimedia.org