User:YiFeiBot/wikiindex size.py: Difference between revisions

Jump to navigation Jump to search
Update -- finally working -- at least I think so
(Update)
(Update -- finally working -- at least I think so)
Line 61: Line 61:
         newtext = text
         newtext = text
          
          
         size_r = re.compile(ur"""(?im)(?P<all>\{\{\s*Size\s*((\s*\|\s*(?P<pages>pages|wiki[ _]pages)\s*=\s*(?P<pages_value>\d*)\s*[^\|\}]*\s*)|(\s*\|\s*(?P<pagesurl>statistics[ _]URL|wiki[ _]statistics[ _]URL)\s*=\s*(?P<pagesurl_value>https?://[^ \|\}\<]*)\s*[^\|\}]*\s*)|(\s*\|\s*(?P<wikifactor>wikiFactor)\s*=\s*(?P<wikifactor_value>\d*)\s*[^\|\}]*\s*)|(\s*\|\s*(?P<wikifactorurl>wikiFactor[ _]URL)\s*=\s*(?P<wikifactorurl_value>http://[^ \|\}\<]*)\s*[^\|\}]*\s*))+\s*\|?\s*\}\}(\(As of (?P<day>[1-31]) (?P<month>(?=January|February|March|April|May|June|July|August|September|October|November|December)) (?P<year>[0-9][0-9][0-9][0-9])\)+\s*\|?\s*))""")
         size_r = re.compile(ur"""(?im)(?P<all>\{\{\s*Size\s*((\s*\|\s*(?P<pages>pages|wiki[ _]pages)\s*=\s*(?P<pages_value>\d*)\s*[^\|\}]*\s*)|(\s*\|\s*(?P<pagesurl>statistics[ _]URL|wiki[ _]statistics[ _]URL)\s*=\s*(?P<pagesurl_value>https?://[^ \|\}\<]*)\s*[^\|\}]*\s*)|(\s*\|\s*(?P<wikifactor>wikiFactor)\s*=\s*(?P<wikifactor_value>\d*)\s*[^\|\}]*\s*)|(\s*\|\s*(?P<wikifactorurl>wikiFactor[ _]URL)\s*=\s*(?P<wikifactorurl_value>http://[^ \|\}\<]*)\s*[^\|\}]*\s*))+\s*\|?\s*\}\}(\(As of (?P<day>[1-31]) (?P<month>(?=January|February|March|April|May|June|July|August|September|October|November|December)) (?P<year>[0-9][0-9][0-9][0-9])\)+\s*\|?\s*)*)""")


         wtext = page.get()
         wtext = page.get()
checkuser, Administrators
2,635

edits

Navigation menu