-2
from bs4 import BeautifulSoup
from urllib.request import urlopen
fout = open('words_list2.txt','w')
url = 'http://endic.naver.com/?sLn=kr'
doc = urlopen(url)
web_page = BeautifulSoup(doc, 'html.parser')
word = web_page.find(attrs={'class':"tit"})
definition = web_page.find(attrs={'class':"align_line"})
fout.write(word.get_text()+':'+ definition.get_text().replace('\u200b',''))
fout.close()
を仕事に行くのではありませんなぜ前の行に有効な結果があると思いますか? –
あなたは何を意味するのかわかりません... –
あなたのコードを読んでいますか? –