Subversion Repositories SmartDukaan

Rev

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

Rev 15451 Rev 15452
Line 142... Line 142...
142
 
142
 
143
def fetchData(br,supc):
143
def fetchData(br,supc):
144
    print "Fetching data for ",supc
144
    print "Fetching data for ",supc
145
    url="http://seller.snapdeal.com/pricing/search?_search=false&gridType=normal&page=1&rows=30&searchType=SUPC&searchValue=%s&sidx=priceUpdateTime&sord=desc"%(supc)
145
    url="http://seller.snapdeal.com/pricing/search?_search=false&gridType=normal&page=1&rows=30&searchType=SUPC&searchValue=%s&sidx=priceUpdateTime&sord=desc"%(supc)
146
    response = br.open(url)
146
    response = br.open(url)
-
 
147
    print response.read()
147
    #dataform = str(response.read()).strip("'<>() ").replace('\'', '\"')
148
    #dataform = str(response.read()).strip("'<>() ").replace('\'', '\"')
148
    struct = json.loads(response.read())
149
    struct = json.loads(response.read())
149
    sdObj = struct['rows'][0]
150
    sdObj = struct['rows'][0]
150
    print sdObj
151
    print sdObj
151
    if type(sdObj['catalogLive']) is None or not (sdObj['catalogLive']):
152
    if type(sdObj['catalogLive']) is None or not (sdObj['catalogLive']):