import pywikibot 
import re, datetime
site = pywikibot.Site('en','wiktionary')
cat = pywikibot.Category(site,'Category:English lemmas')

from pywikibot import pagegenerators
gen = pagegenerators.CategorizedPageGenerator(cat)

page2=pywikibot.Page(site,"User:Julien_Daux/-chin")
page2.text=""
m =re.compile( "(.*){3}") 
m2=re.compile( "\[\[([^\]\|]+)") 
m3=re.compile( "\{\{l\|nv\|([^\}\|]+)") 

count=0

for page in gen:
  count+=1
  if count >500000:
    break
  if count <0:
    continue
    
  if count%10000==0:  
    print(count, noun) #    print(datetime.datetime.now().strftime("%X"), count,"save" ) 
    page2.save()
   
  noun = page.title()  
  #print ("##", count, noun) 
  ns=noun.replace(",", "").replace("-"," ").split(" ")
  #print (ns) 
  if len(ns) >= 3 and ns[0]==ns[1] and ns[0]==ns[2]:
    print(count, noun)
    page2.text+="* [["+noun+"]]\n"
    
print("done")
    
    
    
384 2-2-2
573 4-4-4
10000 air display
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
20000 antiferroelectrically
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
30000 Audrey
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
40000 bel
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
47010 blah blah blah
50000 bonce
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
57041 bup bup bup
60000 calctuff
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
68065 cha cha cha
68068 cha-cha-cha
70000 cheese box
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
80000 coiler
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
90000 coverer
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
100000 death growl
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
110000 diplography
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
115372 dot dot dot
115690 double-double-double
118867 dun dun dun
120000 dysontogenetic
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
130000 epulis
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
140000 feepayer
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
150000 framycetin
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
160000 give someone grief
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
162232 go, go, go
170000 hairbird
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
170850 hamana-hamana-hamana
173713 he he he
174778 hee hee hee
180000 hnn
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
180012 ho, ho, ho
181312 homina homina homina
181877 hon hon hon
190000 idiot-savant
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
200000 intextine
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
210000 KBS
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
220000 Legal
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
225682 location, location, location
230000 machine code
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
240000 meminductor
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
250000 modularity
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
260000 nanobattery
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
267692 nom nom nom
270000 noncoupled
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
280000 occipital horn syndrome
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
Sleeping for 5.0 seconds, 2017-04-29 23:32:09
281568 oggy oggy oggy
290000 overlend
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
300000 pen-tip velocity
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
310000 pivaloyloxymethyl
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
318948 practice, practice, practice
320000 precipitation hardening
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
330000 pushforward
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
340000 reflectionally
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
345945 rhubarb rhubarb rhubarb
350000 roving
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
360000 see to it
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
370000 sinistro-
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
380000 spinule
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
390000 subsignature
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
400000 tartish
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
410000 tiring-room
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
410908 toi, toi, toi
420000 turcopolier
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
430000 uninvent
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
440000 velella
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
448001 well, well, well
450000 Whitean
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
455799 yada yada yada
455802 yadda yadda yadda
460000 zuke
Page [[wiktionary:en:User:Julien Daux/-chin]] saved
done