Patches item #2787889, was opened at 2009-05-06 14:29 Message generated for change (Tracker Item Submitted) made by liangent You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2787889...
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: rewrite Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: liangent (liangent) Assigned to: Nobody/Anonymous (nobody) Summary: getcurrenttime()
Initial Comment: maybe this is better (less cost)
Index: pywikibot/pywikibot/site.py =================================================================== --- pywikibot/pywikibot/site.py (revision 6836) +++ pywikibot/pywikibot/site.py (working copy) @@ -794,10 +794,10 @@
""" r = api.Request(site=self, - action="parse", + action="expandtemplates", text="{{CURRENTTIMESTAMP}}") result = r.submit() - return re.search('\d+', result['parse']['text']['*']).group() + return re.search('\d+', result['expandtemplates']['*']).group()
def getcurrenttime(self): """Return a Timestamp object representing the current server time."""
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2787889...
pywikipedia-bugs@lists.wikimedia.org