| Line 415... |
Line 415... |
| 415 |
resp = {}
|
415 |
resp = {}
|
| 416 |
orderPart = re.findall('.*(\?.*?)$', orderSuccessUrl,re.IGNORECASE)[0]
|
416 |
orderPart = re.findall('.*(\?.*?)$', orderSuccessUrl,re.IGNORECASE)[0]
|
| 417 |
url = ORDER_TRACK_URL + orderPart
|
417 |
url = ORDER_TRACK_URL + orderPart
|
| 418 |
moId = orderPart.split("order=")[-1].split("&")[0]
|
418 |
moId = orderPart.split("order=")[-1].split("&")[0]
|
| 419 |
if self.db.merchantOrder.find_one({"merchantOrderId":moId}):
|
419 |
if self.db.merchantOrder.find_one({"merchantOrderId":moId}):
|
| 420 |
resp['result'] = 'ORDER_ALREDY_CREATED_IGNORED'
|
420 |
resp['result'] = 'ORDER_ALREADY_CREATED_IGNORED'
|
| 421 |
return resp
|
421 |
return resp
|
| 422 |
supcMap = {}
|
422 |
supcMap = {}
|
| 423 |
try:
|
423 |
try:
|
| 424 |
pq = PyQuery(rawHtml)
|
424 |
pq = PyQuery(rawHtml)
|
| 425 |
try:
|
425 |
try:
|
| Line 921... |
Line 921... |
| 921 |
|
921 |
|
| 922 |
|
922 |
|
| 923 |
def main():
|
923 |
def main():
|
| 924 |
#print todict([1,2,"3"])
|
924 |
#print todict([1,2,"3"])
|
| 925 |
store = getStore(3)
|
925 |
store = getStore(3)
|
| - |
|
926 |
store.scrapeStoreOrders()
|
| 926 |
store.parseOrderRawHtml(332222, "3232311", 2, readSSh("/home/amit/sample1.html"), " https://m.snapdeal.com/purchaseMobileComplete?code=a8b3420d4c5bc248ea887df6c9b3a724&order=10478372453")
|
927 |
#store.parseOrderRawHtml(332222, "3232311", 2, readSSh("/home/amit/sample1.html"), " https://m.snapdeal.com/purchaseMobileComplete?code=a8b3420d4c5bc248ea887df6c9b3a724&order=10478372453")
|
| 927 |
#store.scrapeAffiliate()
|
928 |
#store.scrapeAffiliate()
|
| 928 |
#https://m.snapdeal.com/purchaseMobileComplete?code=3fbc8a02a1c4d3c4e906f46886de0464&order=5808451506
|
929 |
#https://m.snapdeal.com/purchaseMobileComplete?code=3fbc8a02a1c4d3c4e906f46886de0464&order=5808451506
|
| 929 |
#https://m.snapdeal.com/purchaseMobileComplete?code=9f4dfa49ff08a16d04c5e4bf519506fc&order=9611672826
|
930 |
#https://m.snapdeal.com/purchaseMobileComplete?code=9f4dfa49ff08a16d04c5e4bf519506fc&order=9611672826
|
| 930 |
|
931 |
|
| 931 |
# orders = list(session.query(OrdersRaw).filter_by(store_id=3).filter_by(status='ORDER_NOT_CREATED').all())
|
932 |
# orders = list(session.query(OrdersRaw).filter_by(store_id=3).filter_by(status='ORDER_NOT_CREATED').all())
|