Multichill created this task.
Multichill added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION

I'm using templatesWithParams() in Pywikibot to extract some data from https://he.wikipedia.org/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%9E%D7%99%D7%96%D7%9E%D7%99_%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94/Wiki_Loves_Monuments/%D7%99%D7%A6%D7%99%D7%A8%D7%95%D7%AA_%D7%90%D7%9E%D7%A0%D7%95%D7%AA_%D7%91%D7%9E%D7%A8%D7%97%D7%91_%D7%94%D7%A6%D7%99%D7%91%D7%95%D7%A8%D7%99

I noticed I only got a fraction. So I wrote this simple script to try:

import pywikibot
site = pywikibot.Site('he', 'wikipedia')
page = pywikibot.Page(site, u'ויקיפדיה:מיזמי_ויקיפדיה/Wiki_Loves_Monuments/יצירות_אמנות_במרחב_הציבורי')

templates = page.templatesWithParams()

for (template, params) in templates:
    print (template)

This only outputs:

... 
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל כותרת]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:ש]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:אתר מורשת בישראל תחתית]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:-]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
[[he:תבנית:יצירת אמנות במרחב הציבורי בישראל בשורה]]
>>>

So a small fraction of what I would expect to get. I don't understand any Hebrew (it's gibberish to me) so it might be me doing something wrong. It's also possible that the wikitext on that page isn't completely sane, making the code trip. Could of course also be a bug. I tagged some Hebrew speakers on this task. Can you help rule out the first two options?

The monuments database is using the same feature and looking at https://commons.wikimedia.org/wiki/Commons:Monuments_database/Statistics it picks up plenty of Hebrew.

Tried it in both python2 as python3 :

$ python pwb.py version
Pywikibot: [https] r-pywikibot-core.git (a351efc, g10348, 2018/10/20, 20:28:15, ok)
Release version: 3.1.dev0
requests version: 2.2.1
  cacerts: /etc/ssl/certs/ca-certificates.crt
    certificate test: ok
Python: 2.7.6 (default, Nov 23 2017, 15:49:48)
$ python3 pwb.py version
Pywikibot: [https] r-pywikibot-core.git (a351efc, g10348, 2018/10/20, 20:28:15, ok)
Release version: 3.1.dev0
requests version: 2.2.1
  cacerts: /etc/ssl/certs/ca-certificates.crt
    certificate test: ok
Python: 3.4.3 (default, Nov 28 2017, 16:41:13)

TASK DETAIL
https://phabricator.wikimedia.org/T207582

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Multichill
Cc: Aklapper, pywikibot-bugs-list, Ynhockey, Ijon, Multichill, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to