Subversion Repositories SmartDukaan

Rev

Rev 5639 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5639 Rev 5640
Line 69... Line 69...
69
 
69
 
70
    def getDataFromProductPage(self, url):
70
    def getDataFromProductPage(self, url):
71
        html = BaseScraper.read(self, url)
71
        html = BaseScraper.read(self, url)
72
        soup = BeautifulSoup(html)
72
        soup = BeautifulSoup(html)
73
        name = soup.find('h1', {'class': 'product-title'})('a')[0].contents[0].string.strip()
73
        name = soup.find('h1', {'class': 'product-title'})('a')[0].contents[0].string.strip()
74
        price = soup.find('span',{'itemprop': 'price'}).string.strip()
74
        price = soup.find('span',{'itemprop': 'price'}).string.strip()[:-2].replace(",","")
75
        in_stock = 1
75
        in_stock = 1
76
        
76
        
77
        data = {
77
        data = {
78
            "product_url": str(url), 
78
            "product_url": str(url), 
79
            "source": "sulekha", 
79
            "source": "sulekha",