Ricordisamoa closed blocking task T57882: The order of parameters is lost when using extract_templates_and_params() and extract_templates_and_params_regex() as "Resolved".
TASK DETAIL
https://phabricator.wikimedia.org/T57880
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Ricordisamoa
Cc: pywikipedia-bugs, Nemo_bis, Beta16, Multichill, Ricordisamoa, Strainu, Xqt, Aklapper
jayvdb added a comment.
A significant cause of this problem is that WikibasePage.text is a dict rather than a string as is expected (and quite logical given the name of the property). This causes _regex to fail badly, and _mwpfh is more graceful.
Another significant issue not yet solved is that textlib.extract_templates_and_params_regex is only able to support 'wikitext' -like text, specifically syntax which uses '{{' and '}}', and we dont have a use-case for extract_templates_and_params other than wikitext templates. The MW 'templates'/'transclusions' concept also includes Lua modules and possibly other extensions, but is there any benefit in extracting parameters from lua invocations? Probably not. And I doubt that mwpfh is likely to support Lua 'transclusions'.
So even if WikibasePage.text returned the raw JSON as a string, calling extract_templates_and_params is simply wasted computation.
So, I propose we move templatesWithParams from BasePage into Page.
TASK DETAIL
https://phabricator.wikimedia.org/T71664
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise, jayvdb
Cc: pywikipedia-bugs, XZise, jayvdb
Phispi created this task.
Phispi added a subscriber: Phispi.
Phispi added a project: pywikibot-core.
Phispi changed Security from none to none.
TASK DESCRIPTION
When I start weblinkchecker in pywikibot-core
`python pwb.py weblinkchecker -start:!`
with MediaWiki 1.23.7 and python 2.7.8
I get the following warning multiple times:
`"WARNING: API warning (query): Too many values supplied for parameter 'pageids': the limit is 50`
and only a subset of pages are scanned.
This refers to `9660f18689130835a27eb67d90aad71157520bd3` of https://gerrit.wikimedia.org/r/pywikibot/core.git
The MediaWiki user is in the `bot` group which has the following permission:
`$wgGroupPermissions['bot']['apihighlimits'] = true;`
The only way to get the script working as expected was the following patch:
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index d4f511b..87ecebb 100644
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -902,9 +902,8 @@ def main(*args):
if gen:
if namespaces != []:
gen = pagegenerators.NamespaceFilterPageGenerator(gen, namespaces)
- # fetch at least 240 pages simultaneously from the wiki, but more if
- # a high thread number is set.
- pageNumber = max(240, config.max_external_links * 2)
+ # fetch at 50 pages simultaneously from the wiki
+ pageNumber = 50
gen = pagegenerators.PreloadingGenerator(gen, step=pageNumber)
gen = pagegenerators.RedirectFilterPageGenerator(gen)
bot = WeblinkCheckerRobot(gen, HTTPignore, day)
Of course this is not the patch I recommend to apply but a workaround for me to make weblinkchecker usable.
TASK DETAIL
https://phabricator.wikimedia.org/T78333
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Phispi
Cc: Aklapper, Phispi, jayvdb, pywikipedia-bugs