1.Python バージョン
Python 2.7.16
2.Requestsをインスコ。
pip3 install requests
3.beautifulsoup4をインスコ。
pip3 install beautifulsoup4
4.テストソース
test3.py
import requests
from bs4 import BeautifulSoup
r = requests.get("https://news.yahoo.co.jp/")
soup = BeautifulSoup(r.content, "html.parser")
# テキストのみ抽出
print(soup.find("ul", "newsFeed_list").text)