Hey Masti,
I think the simplest way is to patch pwb with the patch below. This
will make userprops return the gender as well :) The "nice" way would
probably be to write your own function that calls that particular API
functionality.
Strainu
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 1f8f5344..013bb566 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4914,7 +4914,7 @@ class APISite(BaseSite):
usernames = u"|".join(usernames)
usgen = api.ListGenerator(
"users", ususers=usernames, site=self,
- usprop="blockinfo|groups|editcount|registration|emailable"
+ usprop="blockinfo|groups|editcount|registration|emailable|gender"
)
return usgen
2017-10-11 0:03 GMT+03:00 masti <mastigm(a)gmail.com>om>:
is there a simple method to get the user gender (if
provided)?
User.getprops does not give that info.
masti
_______________________________________________
pywikibot mailing list
pywikibot(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot