def update_watchdeals_archive(): deals = [] deals.extend(onedayawatch_watchdeals()) for deal in deals: dealID=deal['id'] dealUrl=deal['url'] brand='' titleString=deal['title'] imageUrl=deal['imageurl'] offerPrice = 0 originalPrice = 0 categoryId = deal['catid'] if deal.has_key('price'): offerPrice= int(float(deal['price'])) add_watches = DealArchive(categoryId=categoryId,dealId=dealID,dealUrl=dealUrl,brand=brand,titleString=titleString,imageUrl=imageUrl,originalPrice=originalPrice,offerPrice=offerPrice) add_watches.save()
def update_cameradeals_archive(): deals = [] deals.extend(amazon_cameradeals()) deals.extend(woot_cameradeals()) deals.extend(newegg_cameradeals()) deals.extend(tigerdirect_cameradeals()) for deal in deals: dealID=deal['id'] dealUrl=deal['url'] brand='' titleString=deal['title'] imageUrl=deal['imageurl'] offerPrice = 0 originalPrice = 0 categoryId = deal['catid'] if deal.has_key('price'): offerPrice= int(float(deal['price'])) add_camera = DealArchive(categoryId=categoryId,dealId=dealID,dealUrl=dealUrl,brand=brand,titleString=titleString,imageUrl=imageUrl,originalPrice=originalPrice,offerPrice=offerPrice) add_camera.save()