jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/587785 )
Change subject: [bugfix] Fix PetScan generator language and project
......................................................................
[bugfix] Fix PetScan generator language and project
PetScan accepts site.code as "language" (commons, wikidata, species)
instead of site.lang (en, en, en) and also a domain name as "project"
(wikimedia, wikimedia, wikimedia) instead of site.family.name.
In some cases (commons, wikidata) PetScan accepts also site.family.name
as "project", but we can not rely on this. species wiki works only using
species as "language" and wikimedia as "project".
In fact, PetScan needs to create site.dbName() from these fields,
but unfortunately it does not allow to specify site.dbName() directly.
Note: I could not find a way to make it work and test it
on mul:wikisource, this should be also tested.
Bug: T249704
Change-Id: I18b898438ce6a57389d3355ed87a2b19718704f9
---
M pywikibot/pagegenerators.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 5cc2922..60faedb 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -3051,8 +3051,8 @@
extra_options = extra_options or {}
query = {
- 'language': self.site.lang,
- 'project': self.site.family,
+ 'language': self.site.code,
+ 'project': self.site.hostname().split('.')[-2],
'combination': 'subset' if subset_combination else
'union',
'categories': '\r\n'.join(categories),
'format': 'json',
--
To view, visit
https://gerrit.wikimedia.org/r/587785
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I18b898438ce6a57389d3355ed87a2b19718704f9
Gerrit-Change-Number: 587785
Gerrit-PatchSet: 3
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)