Skip to content

Instantly share code, notes, and snippets.

@obafgkm44
Created April 3, 2019 18:43
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 obafgkm44/77bf95c10d42c7f226618af60964aece to your computer and use it in GitHub Desktop.
Save obafgkm44/77bf95c10d42c7f226618af60964aece to your computer and use it in GitHub Desktop.
スクレイピングーー語源で英単語を増やす
import requests
from bs4 import BeautifulSoup as bs4
#<td>のタグを抽出する
r = requests.get('http://gogengo.me/roots')
data = bs4(r.text,'html.parser')
elems = data.findAll("td")
#テキストを画面に出力する
for e in elems:
text = e.get_text()
print(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment