In [ ]:
 
In [1]:
import pywikibot
site = pywikibot.site('test', 'wikipedia')
site
page = pywikibot.Page(site,'test')
page.exists()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-0f7c127a94f2> in <module>()
      1 import pywikibot
----> 2 site = pywikibot.site('test', 'wikipedia')
      3 site
      4 page = pywikibot.Page(site,'test')
      5 page.exists()

TypeError: 'module' object is not callable
In [2]:
import pywikibot
In [3]:
site = pywikibot.site('test', 'wikipedia')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-698102074c5f> in <module>()
----> 1 site = pywikibot.site('test', 'wikipedia')

TypeError: 'module' object is not callable
In [4]:
site = pywikibot.Site('test', 'wikipedia')
In [5]:
site
Out[5]:
APISite("test", "wikipedia")
In [6]:
page = pywikibot.Page(site, 'test')
In [7]:
page.exists()
Out[7]:
True
In [8]:
page.text
Out[8]:
'Hello world!!'
In [9]:
page.save()
Page [[Test]] saved
In [ ]: