Django

Beautiful Soup

Install

pip install beautifulsoup4

Import

from bs4 import BeautifulSoup

Parse html

with open(url) as f:
    soup = BeautifulSoup(f)
    for img in soup.select('a.fancybox img'):
        print(img['src'])
    h1 = soup.select_one('h1.product_title')
    print(h1.text)
    for tr in soup.select('table.detail-table tr'):
        #print(tr.select('td'))
        tds = tr.select('td')
        print(tds[0].text, tds[2].text)