import pywikibot

site=pywikibot.Site('nl')
showline=False

def get_one_line(page):
    one_line=''
    for x in page.text:
      one_line=one_line+x
      if (x=='\n'):
        yield one_line
        one_line=''
 
def count_wiki_links(line):
    counted=0
    start=line.find('[[')
    while (start>=0) and (counted<10):
      counted+=1
      start=line[start+1:].find('[[')
    return counted    

def check_one_page(page,show):
  for line in get_one_line(page):
    #if (show): print(line)
    if (count_wiki_links(line)>1):
        if (show): print(line)
        return True
  return False  


def all_dp_links():
  dptemplate=pywikibot.Page(site, 'template:Dp')
  for page in dptemplate.backlinks():
    yield page

def all_links_from_LND():
    page=pywikibot.Page(site,'Wikipedia:Links_naar_doorverwijspagina%27s/data')
    for link in page.linkedPages():
        yield link.title()
    
def one_page(title):
    return check_one_page(pywikibot.Page(site,title),showline)
    
#for page in all_dp_links():
#  if check_one_page(page,False):  
#    print(page.title())
for xpage in all_links_from_LND():
    if (one_page(xpage)):
        pt=xpage.title()
        print(f'-{pt}')
    
-A
-Acomys
-Albion
-Alexis Jordan
-Amerika
-Antonio Cruz
-Apata
-Arkel
-Assimilatie
-Aston Martin Vantage
-Baan
-Band Of Brothers
-Bastille
-Bengalen
-Berkhof
-Bijbel
-Binsfeld
-Bloemendaal
-Boot
-Brak
-Brandt
-Breukelen
-Buenos Aires
-C
-Cd
-Carré
-Censuur
-Chinees
-Châtelet
-Citadel
-Club
-Crime Story
-Cuba
-De Dood
-De Hoof
-De Stormvogel
-Dood Door Schuld
-Draak
-Egypte
-Engelbrecht
-Es
-Eutheria
-Fes
-Fleur De Lys
-Frankfurt
-Fred Meijer
-Fresco
-Galerij
-Gelre
-God
-Gorki
-Haas
-Harlingen
-Hebron
-Heilige Schrift
-Hermelijn
-Herne
-Hero
-Hertenkamp
-Hobo
-Hooft
-Hoogeveen
-Hoorn
-Hurley
-Hypotheek
-Hypoxie
-Idf
-Illinois
-Imperial
-Jezus
-Jonker
-Judas
-Jury
-Kapelle
-Karakter
-Kolonie
-Koninklijke Nederlandse Schouwburg
-Kreuzberg
-Landsting
-Las Vegas
-Leger
-Leguaan
-London
-Mao
-Mara
-Meerdijk
-Mengen
-Mijn
-Mond
-Musca
-Natuur
-Nieuwe Vertaling
-No Limit
-Norfolk
-Osdorp
-Pc
-Psv
-Paard
-Pelt
-Pentagon
-Philadelphia
-Philips
-Picasso
-Piet Van Dijk
-Plaquette
-Pop
-Proclamatie
-Ras
-Realisme
-Reductie
-Rijksdag
-Rijswijk
-Rome
-Sms
-Sage
-Saint-Gilles
-San Jose Earthquakes
-Saturday Night Fever
-Scherpenzeel
-Schilberg
-Sifon
-Slag
-Soho
-Staatsraad
-Talent
-Tea Party
-Testament
-Thanksgiving
-The Daily Show
-Tin
-Tuindorp
-Universalisme
-Unleashed
-Van Der Made
-Verlichting
-Victoria
-Vierkant
-Wallis
-Were Di
-Westhoek
-Wild Horses
-Woodstock
-Wikipedia:Links Naar Doorverwijspagina'S/Skips