@@ -0,0 +1,1219 @@
+import requests%0Aimport time%0A%0A%0Adef merge_entries():%0A%0A%0A%0Adef fix_part_of_speech():%0A    q = set()%0A    print('get words')%0A    with open('user_data/list_fr_Formes de verbes en fran%C3%A7ais', 'r') as f:%0A        for line in f:%0A            q.add(line.strip('%5Cn'))%0A%0A%0A    print('get list in db')%0A    c = 0%0A    cd_every = 10%0A    print('getting page')%0A    rq1 = requests.get('http://localhost:8100/word?part_of_speech=eq.e-mat&language=eq.fr')%0A    rq2 = rq1.json()%0A%0A    d = set()%0A    cc = 0%0A    while rq2:%0A        for word in rq2:%0A            if word%5B'word'%5D not in q:%0A                c += 1%0A                d.add(word%5B'word'%5D)%0A                if c %3E= 100:%0A                    url = 'http://localhost:8100/word?word=in.(%7B%7D)'.format(','.join(d))%0A                    rq = requests.patch(url, %7B%0A                        'part_of_speech': 'mat'%0A                    %7D)%0A                    d = set()%0A                    c = 0%0A%0A        print('getting page')%0A        rq1 = requests.get('http://localhost:8100/word?part_of_speech=eq.e-mat&language=eq.fr')%0A        cc += 1%0A        if cc %3E= cd_every:%0A            print('cooldown')%0A            time.sleep(20)%0A            cc = 0%0A        rq2 = rq1.json()%0A        if len(rq2) %3C 1:%0A            break%0A%0A%0A%0A

add pos_fix