$ python3 –version
Python 3.6.8
$ pip3 –version
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)
$ sudo pip3 install beautifulsoup4
$ sudo pip3 install requests
$ sudo pip3 install lxml
# -*- coding: utf-8 -*- import requests from bs4 import BeautifulSoup target_url = 'https://kakaku.com/pc/note-pc/itemlist.aspx?pdf_ob=0' r = requests.get(target_url) soup = BeautifulSoup(r.text, 'lxml') for a in soup.find_all('a'): print(a.get('href'))