Skip to content

Instantly share code, notes, and snippets.

@Yuiki
Created May 31, 2019 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yuiki/13020dbd91fc76ae03482f282d87cbe3 to your computer and use it in GitHub Desktop.
Save Yuiki/13020dbd91fc76ae03482f282d87cbe3 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
while True:
word = input()
url = "http://ejje.weblio.jp/content/" + word
request = requests.get(url)
soup = BeautifulSoup(request.text, "html.parser")
meaning = soup.find(class_='content-explanation').text
print(meaning)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment