One of my bots didn't run for a while so I had to catch up at the unconnected pages (see https://nl.wikipedia.org/w/index.php?title=Speciaal:OngekoppeldePaginas&limit=5000&offset=0&namespace=0 ). I use the -unconnected commandline option (https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/pagegenerators.py$985 ). I noticed that if I run "python pwb.py touch.py -lang:nl -family:wikipedia -namespaces:0 -unconnectedpages" that I don't get all pages.
The generator uses site.unconnected_pages ( https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/site.py$6803 ) which using https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/site.py$1915 gets a api.PageGenerator ( https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/data/api.py$2971 ) which is a subclass of the QueryGenerator ( https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/data/api.py$2568 ).
I think the continue handling is going wrong here. Have a look at https://nl.wikipedia.org/w/api.php?action=query&list=querypage&qppage=UnconnectedPages&format=json&qpoffset=10 . The qpoffset is used for the paging and the continue parameter. I don't think we're using the qpoffset
More info at https://www.mediawiki.org/wiki/API:Querypage