Beautiful Soup è una libreria Python per analizzare HTML e XML. Su Debian si installa con il pacchetto python3-bs4.
Installazione
apt-get install -y vim python3
update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2
python --version
apt-get install python3-bs4Test
Crea scrapetest.py:
from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen("https://www.gnu.org")
bsObj = BeautifulSoup(html.read())
print(bsObj.title)chmod +x scrapetest.py
./scrapetest.py