import pywikibot
site = pywikibot.Site('test', 'wikipedia')
site
APISite("test", "wikipedia")
page = pywikibot.Page(site, 'test')
page
Page('Test')
page.exists()
True
page.text = 'Hello world'
page.save()
Page [[Test]] saved
 
 
site = pywikibot.Site('test', 'bdros.ru')
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-4-4f06f393d931> in <module>()
----> 1 site = pywikibot.Site('test', 'bdros.ru')

/srv/paws/pwb/pywikibot/__init__.py in Site(code, fam, user, sysop, interface, url)
   1241 
   1242         if not isinstance(fam, Family):
-> 1243             fam = Family.load(fam)
   1244 
   1245     interface = interface or fam.interface(code)

/srv/paws/pwb/pywikibot/tools/__init__.py in wrapper(*__args, **__kw)
   1518                              cls, depth)
   1519                     del __kw[old_arg]
-> 1520             return obj(*__args, **__kw)
   1521 
   1522         if not __debug__:

/srv/paws/pwb/pywikibot/family.py in load(fam)
    936 
    937         assert all(x in NAME_CHARACTERS for x in fam), \
--> 938             'Name of family %s must be ASCII characters and digits' % fam
    939 
    940         if fam in Family._families:

AssertionError: Name of family bdros.ru must be ASCII characters and digits