Subversion Repositories SmartDukaan

Rev

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

Rev 12259 Rev 13392
Line 40... Line 40...
40
def scrapeSnapdeal():
40
def scrapeSnapdeal():
41
    for data in scrapedInfo:
41
    for data in scrapedInfo:
42
        if data.supc is None or len(data.supc)==0:
42
        if data.supc is None or len(data.supc)==0:
43
            continue
43
            continue
44
        try:
44
        try:
45
            url="http://www.snapdeal.com/acors/json/gvbps?supc=%s&catId=91&sort=sellingPrice"%(data.supc)
45
            url="http://www.snapdeal.com/acors/json/gvbps?supc=%s&catId=175&sort=sellingPrice"%(data.supc)
46
            print url
46
            print url
47
            time.sleep(1)
47
            time.sleep(1)
48
            req = urllib2.Request(url)
48
            req = urllib2.Request(url)
49
            response = urllib2.urlopen(req)
49
            response = urllib2.urlopen(req)
50
            json_input = response.read()
50
            json_input = response.read()