Exemplo n.º 1
0
def check_amazon(amazon_url):
    global _acookie
    f, _acookie = PageScrapper.read_page(amazon_url, _acookie)
    for i in f.split("\n"):
        if(i.find("buyAction") >= 0):
            a, b, c = i.partition("Rs. </span>")
            price = eval(c.replace("</span></span></div>", "").replace(",", ""))
            break
        
    return price
Exemplo n.º 2
0
def check_flipkart(flip_kart_url):
    '''
    '''
    global _fcookie
    start = -1
    price = 0
    f, _fcookie = PageScrapper.read_page(flip_kart_url, _fcookie)
    for i in f.split("\n"):
        j = i.strip()
        if(i.find("fk-font-verybig pprice") >= 0):
            price = eval(j.replace('<span class="fk-font-verybig pprice fk-bold"> Rs. ', '').replace("</span>", ""))
        
    return price