├── README.md └── plural.py /README.md: -------------------------------------------------------------------------------- 1 | # German_Plural_Finder 2 | 3 | It will Help You To find plural Form Of Words In German... 4 | -------------------------------------------------------------------------------- /plural.py: -------------------------------------------------------------------------------- 1 | 2 | import requests 3 | from bs4 import BeautifulSoup 4 | 5 | url = "https://www.verbformen.com/declension/nouns/?w=" 6 | word=input() 7 | url+=word 8 | res = requests.get(url) 9 | html_page = res.content 10 | soup = BeautifulSoup(html_page, 'html.parser') 11 | text = soup.find_all(text=True) 12 | 13 | with open("fname.txt", "w", encoding="utf-8") as f: 14 | f.write(str(text)) 15 | 16 | text=text[text.index('Plural'):text.index('Plural')+20] 17 | die=text.index("die") 18 | Pl="die " 19 | while True: 20 | die+=1 21 | 22 | if text[die]=='\n' or (chr(47)) in text[die]: 23 | break 24 | Pl+=text[die] 25 | print (Pl) 26 | --------------------------------------------------------------------------------