Python でファイルをダウンロードするときの選択肢が増えた
標準パッケージ urllib.requests の関数 urlopen() でファイルをダウンロードするのもいいが、サードパーティー製パッケージ
requests の関数 get() のほうがコンテキスト管理をしないで済むので楽かもしれない。
from bs4 import BeautifulSoup
import requests
response = requests.get('http://www.example.com/')
bs = BeautifulSoup(response.content, 'lxml')
bs.select('table tr td:nth-child(2) a')