DNations.jp added a comment.

  This was my code:
  
    import pywikibot as pwb
    
    site = pwb.Site()
    site.login()
    repo = site.data_repository()
    for claim in pwb.ItemPage(repo, "Q92").get()['claims']['P8']:
        print(type(claim), claim.getSources())
  
  I was able to get the sources only once per ItemPage, even if there were 
multiple claims with references on an item.  The only way to get it to work 
again was to recreate the page.
  
  Using:
  pywikibot version 5.1.0
  Python version 3.8.6 via Spyder 4.2.0
  
  Wikimedia installation:
  MediaWiki     1.31.1
  PHP                   7.4.3 (fpm-fcgi)
  MySQL                 5.7.31-log
  ICU                   66.1
  Elasticsearch         5.6.16

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

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

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

Reply via email to