| Line 74... |
Line 74... |
| 74 |
try:
|
74 |
try:
|
| 75 |
if len(str(item['thumbnail']).strip()) == 0:
|
75 |
if len(str(item['thumbnail']).strip()) == 0:
|
| 76 |
item['thumbnail'] = "http://api.profittill.com/img/no_image_available.png"
|
76 |
item['thumbnail'] = "http://api.profittill.com/img/no_image_available.png"
|
| 77 |
except:
|
77 |
except:
|
| 78 |
print "Exception in item thumbnail",item['_id']
|
78 |
print "Exception in item thumbnail",item['_id']
|
| - |
|
79 |
continue
|
| 79 |
try:
|
80 |
try:
|
| 80 |
skuInfo = __SkuInfo(str(item['skuBundleId']), [int(item['_id'])], str(item['brand']).strip(), str(item['model_name']).strip(), \
|
81 |
skuInfo = __SkuInfo(str(item['skuBundleId']), [int(item['_id'])], str(item['brand']).strip(), str(item['model_name']).strip(), \
|
| 81 |
int(item['category_id']), int(item['subCategoryId']), item['thumbnail'].strip(), title, syn_brand, model_syn, [item['source_product_name'].strip()], \
|
82 |
int(item['category_id']), int(item['subCategoryId']), item['thumbnail'].strip(), title, syn_brand, model_syn, [item['source_product_name'].strip()], \
|
| 82 |
CATEGORY_MAP.get(int(item['category_id'])), SUB_CATEGORY_MAP.get(int(item['subCategoryId'])))
|
83 |
CATEGORY_MAP.get(int(item['category_id'])), SUB_CATEGORY_MAP.get(int(item['subCategoryId'])))
|
| 83 |
except:
|
84 |
except:
|
| 84 |
print "Exception in item ",item['_id']
|
85 |
print "Exception in item ",item['_id']
|
| 85 |
|
86 |
continue
|
| 86 |
catalogMap[int(item['skuBundleId'])] = skuInfo
|
87 |
catalogMap[int(item['skuBundleId'])] = skuInfo
|
| 87 |
|
88 |
|
| 88 |
for data in catalogMap.values():
|
89 |
for data in catalogMap.values():
|
| 89 |
l.append(data.__dict__)
|
90 |
l.append(data.__dict__)
|
| 90 |
solr.add(l)
|
91 |
solr.add(l)
|