Can't run any scripts in pywikibot

210 Views Asked by At

I am trying to use pywikibot, but I can't any script of the scripts. They all return the same error message:

python3 .\pwb.py .\scripts\listpages.py
ERROR: Unable to execute script because no generator was defined.
Use -help for further information.

I am not experienced in python or pywikibot, so I am not sure what's going on. What am I missing?

2

There are 2 best solutions below

0
On

Okay, page generators are predifined switches you have to use:

python3 .\pwb.py .\scripts\listpages.py -search:'hello' -limit:10

In the above example -search is a page generator and -limit is a filter.

More information can be found here.

0
On

Using -help option is a good way to find all generators which can be used with that script.