Subversion Repositories SmartDukaan

Rev

Rev 4039 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

'''
Created on 24-Aug-2011

@author: Varun Gupta
'''
from BeautifulSoup import BeautifulSoup
import urllib

class InfibeamScraper:
    
    def __init__(self):
        self.url = None
        self.id = None
    
    def setUrl(self, url):
        self.url = url
    
    def scrape(self):
        sock = urllib.urlopen(self.url)
        html = sock.read()
        sock.close()
        self.soup = BeautifulSoup(html)
    
    def getPhonePrices(self):
        phone_prices = []
        
        return phone_prices
    
    def getNextUrl(self):
        pass

if __name__ == '__main__':
    s = InfibeamScraper()
    s.setUrl('http://www.infibeam.com/Mobiles/search')
    s.scrape()
    print s.getNextUrl()