| Line 294... |
Line 294... |
| 294 |
sc = ShopCluesScraper.ShopCluesScraper()
|
294 |
sc = ShopCluesScraper.ShopCluesScraper()
|
| 295 |
url = transformUrl(url, 5)
|
295 |
url = transformUrl(url, 5)
|
| 296 |
productInfo = sc.read(url)
|
296 |
productInfo = sc.read(url)
|
| 297 |
except Exception as e:
|
297 |
except Exception as e:
|
| 298 |
print traceback.print_exc()
|
298 |
print traceback.print_exc()
|
| - |
|
299 |
productInfo['price'] = 0.0
|
| - |
|
300 |
productInfo['inStock'] = 0
|
| - |
|
301 |
productInfo['isCod'] = 0
|
| 299 |
raise
|
302 |
|
| 300 |
print "LowestPrice ",productInfo['price']
|
303 |
print "LowestPrice ",productInfo['price']
|
| 301 |
if productInfo['price'] > 0 and productInfo['inStock']==1:
|
304 |
if productInfo['price'] > 0 and productInfo['inStock']==1:
|
| 302 |
get_mongo_connection().Catalog.MasterData.update({'_id':data['_id']}, {'$set' : {'available_price':productInfo['price'],'coupon':productInfo['coupon'],'codAvailable':productInfo['isCod'],'updatedOn':to_java_date(now),'priceUpdatedOn':to_java_date(now),'in_stock':productInfo['inStock']}})
|
305 |
get_mongo_connection().Catalog.MasterData.update({'_id':data['_id']}, {'$set' : {'available_price':productInfo['price'],'coupon':productInfo['coupon'],'codAvailable':productInfo['isCod'],'updatedOn':to_java_date(now),'priceUpdatedOn':to_java_date(now),'in_stock':productInfo['inStock']}})
|
| 303 |
get_mongo_connection().Catalog.Deals.update({'_id':data['_id']}, {'$set' : {'available_price':productInfo['price'] , 'in_stock':productInfo['inStock'],'dealType':data['dealType'], 'rank':data['rank']}})
|
306 |
get_mongo_connection().Catalog.Deals.update({'_id':data['_id']}, {'$set' : {'available_price':productInfo['price'] , 'in_stock':productInfo['inStock'],'dealType':data['dealType'], 'rank':data['rank']}})
|
| 304 |
else:
|
307 |
else:
|