This notebook helps me explore data about the item creation timeline on Wikidata, as per this figure:
The code used to generate the graph is quite old, which causes a DeprecationWarning that I could not yet get rid of:
import pywikibot # to access Wikidata site = pywikibot.Site('wikidata', 'wikidata') #Page number one page = pywikibot.Page(site, 'q%i' % 1) print(str(page.getVersionHistory(reverse=True, total=1)) + '\t' + str(1))
WARNING: /srv/paws/lib/python3.6/site-packages/ipykernel_launcher.py:5: DeprecationWarning: pywikibot.page.BasePage.getVersionHistory is deprecated for 4 years and 10 months; use Page.revisions() instead. """
I tried the following line to address the DeprecationWarning but did not get the output to work:
print(str(page.revisions(reverse=True, total=1)) + '\t' + str(1))
<generator object BasePage.revisions.<locals>.<genexpr> at 0x7f61c00521a8> 1
I'm stuck here and going to ask around a bit. The page https://www.mediawiki.org/wiki/Manual:Pywikibot has a "Get help" section which points to a defunct IRC. After a bit of searching, I found https://webchat.freenode.net/#pywikibot and asked my question there but nobody seemed to be around, so here I am again.