| Line 129... |
Line 129... |
| 129 |
snapdealItem.lowestSnapdealOfferPrice = lowestOfferPrice
|
129 |
snapdealItem.lowestSnapdealOfferPrice = lowestOfferPrice
|
| 130 |
snapdealItem.lowestSnapdealSeller = lowestSellerName
|
130 |
snapdealItem.lowestSnapdealSeller = lowestSellerName
|
| 131 |
snapdealItem.lowestSnapdealSellerInventory = lowestSellerInventory
|
131 |
snapdealItem.lowestSnapdealSellerInventory = lowestSellerInventory
|
| 132 |
|
132 |
|
| 133 |
def scrapFlipkart(flipkartItems):
|
133 |
def scrapFlipkart(flipkartItems):
|
| - |
|
134 |
scraperFk = FlipkartScraper.FlipkartScraper()
|
| 134 |
for flipkartItem in flipkartItems:
|
135 |
for flipkartItem in flipkartItems:
|
| 135 |
scraperFk = FlipkartScraper.FlipkartScraper()
|
- |
|
| 136 |
fkItem = FlipkartItem.get_by(item_id=flipkartItem.item_id)
|
136 |
fkItem = FlipkartItem.get_by(item_id=flipkartItem.item_id)
|
| 137 |
if fkItem is None:
|
137 |
if fkItem is None:
|
| 138 |
continue
|
138 |
continue
|
| 139 |
try:
|
139 |
try:
|
| 140 |
url = "http://www.flipkart.com/ps/%s"%(fkItem.flipkartSerialNumber)
|
140 |
url = "http://www.flipkart.com/ps/%s"%(fkItem.flipkartSerialNumber)
|
| Line 175... |
Line 175... |
| 175 |
if session.is_active:
|
175 |
if session.is_active:
|
| 176 |
print "session is active. closing it."
|
176 |
print "session is active. closing it."
|
| 177 |
session.close()
|
177 |
session.close()
|
| 178 |
|
178 |
|
| 179 |
def scrapAmazon(amazonItems,br):
|
179 |
def scrapAmazon(amazonItems,br):
|
| - |
|
180 |
sc = SellerCentralScraper.SellerCentralScraper()
|
| 180 |
for amazonItem in amazonItems:
|
181 |
for amazonItem in amazonItems:
|
| 181 |
sc = SellerCentralScraper.SellerCentralScraper()
|
- |
|
| 182 |
skuUrlMfn = "https://sellercentral.amazon.in/myi/search/ProductSummary?keyword=%d" %(amazonItem.item_id)
|
182 |
skuUrlMfn = "https://sellercentral.amazon.in/myi/search/ProductSummary?keyword=%d" %(amazonItem.item_id)
|
| 183 |
skuUrlFba = "https://sellercentral.amazon.in/myi/search/ProductSummary?keyword=FBA%d" %(amazonItem.item_id)
|
183 |
skuUrlFba = "https://sellercentral.amazon.in/myi/search/ProductSummary?keyword=FBA%d" %(amazonItem.item_id)
|
| 184 |
try:
|
184 |
try:
|
| 185 |
print type(sc.requestSku(br, skuUrlMfn))
|
185 |
print type(sc.requestSku(br, skuUrlMfn))
|
| 186 |
asin, mfnInventory, mfnPrice= sc.requestSku(br, skuUrlMfn)
|
186 |
asin, mfnInventory, mfnPrice= sc.requestSku(br, skuUrlMfn)
|