Xqt added subscribers: Dalba, valhallasw, Earwig, Legoktm, Xqt.
Xqt added a comment.


  This is a known restriction of the parsing regex. to get the expected result 
please `pip install mwparserfromhell`. Here are the results:
  
  Using parsing regex
  -------------------
  
    >>> import pywikibot
    >>> site = pywikibot.Site().data_repository()
    >>> page = pywikibot.Page(site, 'User:Jean-Frédéric/T240312')
    >>> temp = page.templatesWithParams()
    >>> temp
    [(Page('Template:Property dashboard end'), [])]
    >>> 
  
  Using mwparserfromhell
  ----------------------
  
    >>> import pywikibot
    >>> site = pywikibot.Site().data_repository()
    >>> page = pywikibot.Page(site, 'User:Jean-Frédéric/T240312')
    >>> temp = page.templatesWithParams()
    >>> temp
    [(Page('Template:Property dashboard'), ['grouping_property=P131', 
'grouping_threshold=0', 'higher_grouping=wdt:P131', 
'properties=P625,P18,P6375', 'property_threshold=0', 'selector_sparql=wdt:P17 
wd:Q408; wdt:P31 ?type . { SELECT * WHERE { ?type wdt:P279 wd:Q7075 } }', 
'stats_for_no_group=1']), (Page('Template:Property dashboard end'), [])]
    >>> 
  
  **Probably mwparserfromhell or wikitextparser should become mandatory for 
Pywikibot.**

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

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

To: Xqt
Cc: Xqt, Legoktm, Earwig, valhallasw, Dalba, Aklapper, JeanFred, 
pywikibot-bugs-list, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, 
Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to