User:JackBot/frfromsite.py
Jump to navigation
Jump to search
# coding: utf-8
# This script creates the French entries from the French Wiktionary, which are attested by at least another online dictionary
# Importing modules
from wikipedia import *
import urllib, config, re, sys, codecs
# Declaring all global values
language = "en"
family = "wiktionary"
mynick = "JackBot"
filename = "articles_list.txt"
msg={
'en': u'Importations from [[fr:|fr.wiktionary]] attested by another online dictionary'
}
# Word existence checking
word = raw_input("Please enter a French verb form.\n")
onlinedict = urllib.urlopen("http://www.larousse.fr/dictionnaires/rechercher/" + word,"utf-8").read()
existence = onlinedict.find("v.")
if existence > 0:
print (word + " is a French verb form\n")
else:
print (word + " is not a French verb form\n")