Subversion Repositories SmartDukaan

Rev

Rev 5761 | Rev 6022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5761 Rev 5770
Line 107... Line 107...
107
    def getDataFromProductPage(self, url):
107
    def getDataFromProductPage(self, url):
108
        html = BaseScraper.read(self, url)
108
        html = BaseScraper.read(self, url)
109
        soup = BeautifulSoup(html)
109
        soup = BeautifulSoup(html)
110
        name = soup.find('h1',{'class': 'left-content-product-heading'}).string.strip()
110
        name = soup.find('h1',{'class': 'left-content-product-heading'}).string.strip()
111
        price = soup.find('b', {'id': 'tPrice'}).string.strip()
111
        price = soup.find('b', {'id': 'tPrice'}).string.strip()
-
 
112
        if("Rs." in price):
-
 
113
            price = price[4:]
112
        in_stock = 1
114
        in_stock = 1
113
        
115
        
114
        data = {
116
        data = {
115
            "product_url": str(url), 
117
            "product_url": str(url), 
116
            "source": "tradus", 
118
            "source": "tradus",