import pywikibot
from pywikibot import pagegenerators
import time

lang = 'de'
family = 'wikipedia'
touch_categories = [ 'Kategorie:Wikipedia:Artikel ohne Wikidata-Datenobjekt' ] # list of categories, may be empty; including Category: namespace prefix
touch_backlinks = [] # list of pages, may be empty; including namespace prefixes

wikipedia_site = pywikibot.Site(lang, family)
waitTime = 5
pages = []

for touch_category in touch_categories:
    for page in pagegenerators.CategorizedPageGenerator(pywikibot.Category(wikipedia_site, touch_category)):
        pages.append(page)

for touch_backlink in touch_backlinks:
    backlink_page = pywikibot.Page(wikipedia_site, touch_backlink)
    backlinks = backlink_page.backlinks(follow_redirects=False, filter_redirects=False, total=None, content=False)
    for page in backlinks:
        pages.append(page)
        
for page in pages:        
    page.touch(quiet=True)
    print('Touched "{}" (in {}.{})'.format(page.title(), lang, family))
    time.sleep(waitTime)

print()
print('All done, task finished')
Touched "9,3 × 74 mm R" (in de.wikipedia)
Touched "Eric Abbott" (in de.wikipedia)
Touched "Afrika-Cup (Begriffsklärung)" (in de.wikipedia)
Touched "Alone" (in de.wikipedia)
Touched "Christoph J. Amor" (in de.wikipedia)
Touched "Amtshaftung" (in de.wikipedia)
Touched "Atomsymbol" (in de.wikipedia)
Touched "Berufsbildung" (in de.wikipedia)
Touched "Bis(trimethylsilyl)peroxid" (in de.wikipedia)
Touched "Bloods und Crips" (in de.wikipedia)
Touched "BMW 8er" (in de.wikipedia)
Touched "BMW E31" (in de.wikipedia)
Touched "Booba (Animationsserie)" (in de.wikipedia)
Touched "BroBizz" (in de.wikipedia)
Touched "Bundesverband Geriatrie" (in de.wikipedia)
Touched "CA-94 (Luftabwehrrakete)" (in de.wikipedia)
Touched "Carvalho" (in de.wikipedia)
Touched "Cheveuges" (in de.wikipedia)
Touched "Erich Chrobog" (in de.wikipedia)
Touched "Coffeeville" (in de.wikipedia)
Touched "Croix River (Dominica)" (in de.wikipedia)
Touched "Cunèges" (in de.wikipedia)
Touched "CWG Christian Weber" (in de.wikipedia)
Touched "Dagi (Untervorsteher der Priester)" (in de.wikipedia)
Touched "Der Kreuzritter" (in de.wikipedia)
Touched "Deutsches Krankenhaus Adressbuch" (in de.wikipedia)
Touched "Diakoniewissenschaftliches Institut Heidelberg" (in de.wikipedia)
Touched "Die rollende Kugel" (in de.wikipedia)
Touched "Dirty Talk (Filmreihe)" (in de.wikipedia)
Touched "DS3 Crossback" (in de.wikipedia)
Touched "Eicherhof" (in de.wikipedia)
Touched "Eponymie" (in de.wikipedia)
Touched "Excelsior (Schiff, 1987)" (in de.wikipedia)
Touched "Auguste Fauchard" (in de.wikipedia)
Touched "FFCC" (in de.wikipedia)
Touched "Fleury (Aisne)" (in de.wikipedia)
Touched "FLX" (in de.wikipedia)
Touched "Frangi" (in de.wikipedia)
Touched "Frank-Loeb-Institut" (in de.wikipedia)
Touched "Die Freudenspender" (in de.wikipedia)
Touched "Game Drive" (in de.wikipedia)
Touched "Reinhard Gammenthaler" (in de.wikipedia)
Touched "Gein (chemische Verbindung)" (in de.wikipedia)
Touched "Ghaub" (in de.wikipedia)
Touched "Gilels" (in de.wikipedia)
Touched "Tatjana Iossifowna Goldfarb" (in de.wikipedia)
Touched "Greg Miller" (in de.wikipedia)
Touched "Grüß Gott (Begriffsklärung)" (in de.wikipedia)
Touched "Hochbunker Sonnwendjochstraße" (in de.wikipedia)
Touched "Huecas" (in de.wikipedia)
Touched "Intergroove" (in de.wikipedia)
Touched "I’m Sorry (Joyner-Lucas-Lied)" (in de.wikipedia)
Touched "Kakerbeck-Doosthof" (in de.wikipedia)
Touched "KamAZ-54115" (in de.wikipedia)
Touched "Kangchendzönga" (in de.wikipedia)
Touched "Atakan Karazor" (in de.wikipedia)
Touched "Keelboat" (in de.wikipedia)
Touched "Kenoplumbomikrolith" (in de.wikipedia)
Touched "Kerala Folklore Museum" (in de.wikipedia)
Touched "Kienaden" (in de.wikipedia)
Touched "St. Walburga (Steinfort)" (in de.wikipedia)
Touched "Kirchweihrede" (in de.wikipedia)
Touched "Kodály" (in de.wikipedia)
Touched "Kolibri (Kabarett)" (in de.wikipedia)
Touched "Max-Arnold Köttgen" (in de.wikipedia)
Touched "Karl Krampol" (in de.wikipedia)
Touched "Krämer AG" (in de.wikipedia)
Touched "Kirche Kuhlrade" (in de.wikipedia)
Touched "Eberhard Lange" (in de.wikipedia)
Touched "Laubenberg (Adelsgeschlecht)" (in de.wikipedia)
Touched "Horst Link" (in de.wikipedia)
Touched "Logone Occidental (Fluss)" (in de.wikipedia)
Touched "Lorignac" (in de.wikipedia)
Touched "Gerd Mannes" (in de.wikipedia)
Touched "Mareuil-sur-Arnon" (in de.wikipedia)
Touched "Masttransformator" (in de.wikipedia)
Touched "Medizin (Lied)" (in de.wikipedia)
Touched "Mesosaurusfossilien Keetmanshoop" (in de.wikipedia)
Touched "Mibag" (in de.wikipedia)
Touched "Midland Machine Works" (in de.wikipedia)
Touched "Miller (Automobilhersteller)" (in de.wikipedia)
Touched "Milwaukee Auto Engines and Supply Company" (in de.wikipedia)
Touched "Milwaukee Moto Company" (in de.wikipedia)
Touched "Mino Cyclecar Company" (in de.wikipedia)
Touched "Mission Motor Car Company" (in de.wikipedia)
Touched "Darrel Moellendorf" (in de.wikipedia)
Touched "La Moncelle" (in de.wikipedia)
Touched "Moorbrand 2018 (Emsland)" (in de.wikipedia)
Touched "Morteratsch (Pontresina)" (in de.wikipedia)
Touched "Morthomiers" (in de.wikipedia)
Touched "N,N′-Bis(trimethylsilyl)harnstoff" (in de.wikipedia)
Touched "Nicolás Correa (Unternehmen)" (in de.wikipedia)
Touched "Noon Wine (1966)" (in de.wikipedia)
Touched "Nova Palmeira" (in de.wikipedia)
Touched "Obersteinbach (Bad Heilbrunn)" (in de.wikipedia)
Touched "Oigny-en-Valois" (in de.wikipedia)
Touched "Olympische Geschichte des Nordjemen" (in de.wikipedia)
Touched "Olympische Geschichte des Südjemen" (in de.wikipedia)
Touched "Onuphidae" (in de.wikipedia)
Touched "Ostfeld (Bad Heilbrunn)" (in de.wikipedia)
Touched "Panoramalift (Melchsee-Frutt)" (in de.wikipedia)
Touched "Paradis" (in de.wikipedia)
Touched "Johann (I.) von Pasqualini" (in de.wikipedia)
Touched "Pastorale (bildende Kunst)" (in de.wikipedia)
Touched "Piastenschloss (Brzeg)" (in de.wikipedia)
Touched "Pinto Coelho" (in de.wikipedia)
Touched "Podling (Bad Heilbrunn)" (in de.wikipedia)
Touched "Poisieux" (in de.wikipedia)
Touched "Ramsau (Bad Heilbrunn)" (in de.wikipedia)
Touched "Reindlschmiede" (in de.wikipedia)
Touched "Revelation (Lied)" (in de.wikipedia)
Touched "Rundfunkabgabe" (in de.wikipedia)
Touched "Anica Russo" (in de.wikipedia)
Touched "Saint-Gervais-en-Vallière" (in de.wikipedia)
Touched "Saint-Rémy-Blanzy" (in de.wikipedia)
Touched "Salmon River (Fortune Bay)" (in de.wikipedia)
Touched "Flaminia zu Salm-Salm" (in de.wikipedia)
Touched "SAN" (in de.wikipedia)
Touched "Santa Cruz del Retamar" (in de.wikipedia)
Touched "Sauval" (in de.wikipedia)
Touched "Schifffahrtsmuseum" (in de.wikipedia)
Touched "Gerhard Schmidt (Steuerberater)" (in de.wikipedia)
Touched "Schönau (Bad Heilbrunn)" (in de.wikipedia)
Touched "Erika Schwarz" (in de.wikipedia)
Touched "Alexander Soddy" (in de.wikipedia)
Touched "Söngvakeppnin 2019" (in de.wikipedia)
Touched "Sonseca" (in de.wikipedia)
Touched "Carsten Spallek" (in de.wikipedia)
Touched "Spektrum (Festival)" (in de.wikipedia)
Touched "St. Timothei" (in de.wikipedia)
Touched "Strategische Planung (Betriebswirtschaft)" (in de.wikipedia)
Touched "Suhor" (in de.wikipedia)
Touched "Surfanzug" (in de.wikipedia)
Touched "Theodor-Heuss-Platz (Osnabrück)" (in de.wikipedia)
Touched "Tris(2,3-dibrompropyl)isocyanurat" (in de.wikipedia)
Touched "Dominik Truschner" (in de.wikipedia)
Touched "Turnus (Ausstellung)" (in de.wikipedia)
Touched "Unterbuchen (Bad Heilbrunn)" (in de.wikipedia)
Touched "Unterenzenau" (in de.wikipedia)
Touched "Unterkarpfsee" (in de.wikipedia)
Touched "Untersteinbach (Bad Heilbrunn)" (in de.wikipedia)
Touched "Cohors II Varcianorum" (in de.wikipedia)
Touched "Villeneuve-sur-Cher" (in de.wikipedia)
Touched "Villers-sur-Bar" (in de.wikipedia)
Touched "Voglherd (Bad Heilbrunn)" (in de.wikipedia)
Touched "Wallfahrtskapelle St. Gerebernus (Sonsbeck)" (in de.wikipedia)
Touched "Richard Weickgenannt" (in de.wikipedia)
Touched "Weiherweber" (in de.wikipedia)
Touched "Weltfriedensglocke (Berlin-Friedrichshain)" (in de.wikipedia)
Touched "Viktorin Weyer" (in de.wikipedia)
Touched "Wiesweber" (in de.wikipedia)
Touched "Wolfsland: Tief im Wald" (in de.wikipedia)
Touched "Jimmy Wong" (in de.wikipedia)
Touched "Wörnern" (in de.wikipedia)
Touched "Zeughaus (St. Gallen)" (in de.wikipedia)
Touched "Zhou Qing" (in de.wikipedia)
Touched "Ziehnert" (in de.wikipedia)
Touched "Zulassung (Verwaltungsrecht)" (in de.wikipedia)

All done, task finished