| Line 483... |
Line 483... |
| 483 |
for prodDiv in productDivs:
|
483 |
for prodDiv in productDivs:
|
| 484 |
prodDiv.find('div', {'class':'a-fixed-left-grid-inner'})
|
484 |
prodDiv.find('div', {'class':'a-fixed-left-grid-inner'})
|
| 485 |
productTitle = prodDiv.find('div', {'class':'a-fixed-left-grid-inner'}).find("div", {'class':'a-row'}).find('a').text.strip()
|
485 |
productTitle = prodDiv.find('div', {'class':'a-fixed-left-grid-inner'}).find("div", {'class':'a-row'}).find('a').text.strip()
|
| 486 |
imgUrl = prodDiv.find("img")["src"]
|
486 |
imgUrl = prodDiv.find("img")["src"]
|
| 487 |
for subOrder in activeOrder['subOrders']:
|
487 |
for subOrder in activeOrder['subOrders']:
|
| 488 |
if subOrder['productTitle'] == productTitle:
|
488 |
if subOrder['productTitle'] in productTitle:
|
| 489 |
findMap = {"orderId": activeOrder['orderId'], "subOrders.merchantSubOrderId": subOrder.get("merchantSubOrderId")}
|
489 |
findMap = {"orderId": activeOrder['orderId'], "subOrders.merchantSubOrderId": subOrder.get("merchantSubOrderId")}
|
| 490 |
updateMap = {}
|
490 |
updateMap = {}
|
| 491 |
closedStatus = False
|
491 |
closedStatus = False
|
| 492 |
updateMap['subOrders.$.imgUrl'] = imgUrl
|
492 |
updateMap['subOrders.$.imgUrl'] = imgUrl
|
| 493 |
updateMap['subOrders.$.lastTracked'] = timestamp
|
493 |
updateMap['subOrders.$.lastTracked'] = timestamp
|
| Line 676... |
Line 676... |
| 676 |
# ('Accept', 'text/html,application/xhtml+xml,application/json,application/xml;q=0.9,*/*;q=0.8'),
|
676 |
# ('Accept', 'text/html,application/xhtml+xml,application/json,application/xml;q=0.9,*/*;q=0.8'),
|
| 677 |
# ('Accept-Encoding', 'gzip,deflate,sdch'),
|
677 |
# ('Accept-Encoding', 'gzip,deflate,sdch'),
|
| 678 |
# ('Accept-Language', 'en-US,en;q=0.8'),
|
678 |
# ('Accept-Language', 'en-US,en;q=0.8'),
|
| 679 |
# ('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.3')]
|
679 |
# ('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.3')]
|
| 680 |
# store.scrapeStoreOrders()
|
680 |
# store.scrapeStoreOrders()
|
| 681 |
store.parseInfo()
|
681 |
#store.parseInfo()
|
| 682 |
#store.parseOrderRawHtml(9274, "13232", 14, readSSh("/home/amit/Downloads/9274.html"), "https://www.amazon.in/gp/buy/spc/handlers/static-submit-decoupled.html/ref=ox_spc_place_order?ie=UTF8&fromAnywhere=1&hasWorkingJav")
|
682 |
#store.parseOrderRawHtml(9274, "13232", 14, readSSh("/home/amit/Downloads/9274.html"), "https://www.amazon.in/gp/buy/spc/handlers/static-submit-decoupled.html/ref=ox_spc_place_order?ie=UTF8&fromAnywhere=1&hasWorkingJav")
|
| 683 |
#store.trackOrdersForUser(4355, "https://www.amazon.in/gp/css/summary/edit.html?orderID=171-4824011-7090713", readSSh("~/4355"))
|
683 |
#store.trackOrdersForUser(4355, "https://www.amazon.in/gp/css/summary/edit.html?orderID=171-4824011-7090713", readSSh("~/4355"))
|
| 684 |
#readSSh("/tmp/User211/2015-04-12 10:32:41.905765")
|
684 |
#readSSh("/tmp/User211/2015-04-12 10:32:41.905765")
|
| 685 |
#store.scrapeAffiliate()
|
685 |
#store.scrapeAffiliate()
|
| 686 |
#parseDetailNotCreated()
|
686 |
#parseDetailNotCreated()
|
| 687 |
#parseOrderNotCreated()
|
687 |
#parseOrderNotCreated()
|
| - |
|
688 |
store.trackOrdersForUser(8703, 'https://www.amazon.in/gp/css/order-history', readSSh('/home/amit/Downloads/orderSummary06-10_12_15_54'))
|
| 688 |
|
689 |
|
| 689 |
def parseDetailNotCreated():
|
690 |
def parseDetailNotCreated():
|
| 690 |
try:
|
691 |
try:
|
| 691 |
store=getStore(1)
|
692 |
store=getStore(1)
|
| 692 |
orders = session.query(OrdersRaw).filter_by(status='DETAIL_NOT_CREATED_UNKNOWN').all()
|
693 |
orders = session.query(OrdersRaw).filter_by(status='DETAIL_NOT_CREATED_UNKNOWN').all()
|