import pywikibot
site = pywikibot.Site('test', 'wikipedia')
Wikipedia
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-a851f371f659> in <module>()
----> 1 Wikipedia

NameError: name 'Wikipedia' is not defined
site
APISite("test", "wikipedia")
page = pywikibot.Page(site, 'test')
page.exists()
True
page.text
"Did you hear about the restaurant on the moon? Great food, no atmosphere.\n\nWhat do you call a fake noodle? An Impasta.\n\nHow many apples grow on a tree? All of them.\n\nWant to hear a joke about paper? Nevermind it's tearable.\n\nI just watched a program about beavers. It was the best dam program I've ever seen.\n\nWhy did the coffee file a police report? It got mugged.\nHow does a penguin build it's house? Igloos it together.\n\nDad, did you get a haircut? No I got them all cut.\n\nDad, can you put my shoes on? No, I don't think they'll fit me.\n\nWhy did the scarecrow win an award? Because he was outstanding in his field.\n\nWhy don't skeletons ever go trick or treating? Because they have no body to go with.\n\nIll call you later. Don't call me later, call me Dad.\n\nWhat do you call an elephant that doesn't matter? An irrelephant\n\nWant to hear a joke about construction? I'm still working on it.\n\nWhat do you call cheese that isn't yours? Nacho Cheese.\n\nWhy couldn't the bicycle stand up by itself? It was two tired.\n\nWhat did the grape do when he got stepped on? He let out a little wine.\n\nI wouldn't buy anything with velcro. It's a total rip-off.testttestt"
page.text = 'Hello world'
page.save()
Sleeping for 8.0 seconds, 2018-11-10 14:46:36
WARNING: API error protectedpage: This page has been protected to prevent editing or other actions.
---------------------------------------------------------------------------
APIError                                  Traceback (most recent call last)
/srv/paws/pwb/pywikibot/site.py in editpage(self, page, summary, minor, notminor, bot, recreate, createonly, nocreate, watch, **kwargs)
   5218                 try:
-> 5219                     result = req.submit()
   5220                     pywikibot.debug('editpage response: %s' % result,

/srv/paws/pwb/pywikibot/data/api.py in submit(self)
   2272 
-> 2273                 raise APIError(**result['error'])
   2274             except TypeError:

APIError: protectedpage: This page has been protected to prevent editing or other actions. [help:See https://test.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]

During handling of the above exception, another exception occurred:

LockedPage                                Traceback (most recent call last)
<ipython-input-9-64cff476e651> in <module>()
----> 1 page.save()

/srv/paws/pwb/pywikibot/tools/__init__.py in wrapper(*__args, **__kw)
   1738                              cls, depth)
   1739                     del __kw[old_arg]
-> 1740             return obj(*__args, **__kw)
   1741 
   1742         if not __debug__:

/srv/paws/pwb/pywikibot/tools/__init__.py in wrapper(*__args, **__kw)
   1738                              cls, depth)
   1739                     del __kw[old_arg]
-> 1740             return obj(*__args, **__kw)
   1741 
   1742         if not __debug__:

/srv/paws/pwb/pywikibot/page.py in save(self, summary, watch, minor, botflag, force, asynchronous, callback, apply_cosmetic_changes, quiet, **kwargs)
   1282         self._save(summary=summary, watch=watch, minor=minor, botflag=botflag,
   1283                    asynchronous=asynchronous, callback=callback,
-> 1284                    cc=apply_cosmetic_changes, quiet=quiet, **kwargs)
   1285 
   1286     @allow_asynchronous

/srv/paws/pwb/pywikibot/page.py in wrapper(self, *args, **kwargs)
    128             pywikibot.async_request(handle, func, self, *args, **kwargs)
    129         else:
--> 130             handle(func, self, *args, **kwargs)
    131 
    132     manage_wrapping(wrapper, func)

/srv/paws/pwb/pywikibot/page.py in handle(func, self, *args, **kwargs)
    119             if not callback and not do_async:
    120                 if isinstance(err, pywikibot.PageSaveRelatedError):
--> 121                     raise err
    122                 raise pywikibot.OtherPageSaveError(self, err)
    123         if callback:

/srv/paws/pwb/pywikibot/page.py in handle(func, self, *args, **kwargs)
    107         err = None
    108         try:
--> 109             func(self, *args, **kwargs)
    110         # TODO: other "expected" error types to catch?
    111         except pywikibot.Error as edit_err:

/srv/paws/pwb/pywikibot/page.py in _save(self, summary, watch, minor, botflag, cc, quiet, **kwargs)
   1293 
   1294         done = self.site.editpage(self, summary=summary, minor=minor,
-> 1295                                   watch=watch, bot=botflag, **kwargs)
   1296         if not done:
   1297             if not quiet:

/srv/paws/pwb/pywikibot/site.py in callee(self, *args, **kwargs)
   1321             else:
   1322                 raise Exception('Not implemented')
-> 1323             return fn(self, *args, **kwargs)
   1324 
   1325         if not __debug__:

/srv/paws/pwb/pywikibot/site.py in editpage(self, page, summary, minor, notminor, bot, recreate, createonly, nocreate, watch, **kwargs)
   5236                             raise Error(self._ep_errors[err.code] % errdata)
   5237                         else:
-> 5238                             raise self._ep_errors[err.code](page)
   5239                     pywikibot.debug(
   5240                         "editpage: Unexpected error code '%s' received."

LockedPage: Page [[test:Test]] is locked.
weblinkchecker.py
pwb.py weblinkchecker -start:!
  File "<ipython-input-11-384e8eb29db4>", line 1
    pwb.py weblinkchecker -start:!
                        ^
SyntaxError: invalid syntax
python pwb.py weblinkchecker -repeat
  File "<ipython-input-12-ffcdfcc8aa8c>", line 1
    python pwb.py weblinkchecker -repeat
             ^
SyntaxError: invalid syntax