@@ -0,0 +1,818 @@
+from bs4 import BeautifulSoup%0Aimport urllib2%0A%0Aclass SpecificationScraper(object):%0A    def __init__(self, url):%0A        self.url = url%0A        self.specs_soup = None%0A        self.specs = %7B%7D%0A%0A    def download_page(self):%0A        if self.specs_soup is not None:%0A            return%0A%0A        try:%0A            p = urllib2.urlopen(self.url, None)%0A            s = BeautifulSoup(p.read(), %22html.parser%22)%0A%0A            self.specs_soup = s.find(id=%22product-specs%22)%0A        except:%0A            print %22Failed to download specs%22%0A%0A    def parse_page(self):%0A        self.download_page()%0A        try:%0A            for tr in self.specs_soup.find_all('tr'):%0A                ths = tr.find_all('th')%0A                self.specs%5Bths%5B0%5D.text%5D = ths%5B1%5D.text%0A            print self.specs%0A        except:%0A            print %22Unable to parse specs%22%0A

Add specifications scraper