More than 3 years have passed since last update.
posted at 2019-02-19
updated at 2019-02-21
import urllib.request from bs4 import BeautifulSoup # URL設定 url = 'https://xxx' # 読み込み html = urllib.request.urlopen(url) # HTMLパース soup = BeautifulSoup(html, "html.parser")
これでsoupの中にHTMLのデータが存在しますので、.find(タグ)や.get(クラス)などで詳細が取得できます。
Webスクレイピング NewsAPI Pandas