Exemplo n.º 1
0
 def __init__(self):
     site = abcmart.AbcMart("abcmart", "https://gs.abc-mart.net")
     ret, _ = site.login('*****@*****.**', 'juyoujin110')
     if not ret:
         print("exit")
         sys.exit(1)
     site.addcart('6025230001012')
Exemplo n.º 2
0
 def run(self, user, passwd, gcode):
     site = abcmart.AbcMart("abcmart", "https://gs.abc-mart.net")
     ret, _ = site.login(user, passwd)
     if not ret:
         logger.error("===Login Failed")
         sys.exit(1)
     # get product list
     site.addCart(gcode)
     site.submitOrder()
Exemplo n.º 3
0
 def proxy(self, user, proxy):
     proxies = {'http': 'http://' + proxy, 'https': 'https://' + proxy}
     site = abcmart.AbcMart("abcmart", "https://gs.abc-mart.net")
     site.addProxy(user, proxies)
     site.activeProxy(user)
Exemplo n.º 4
0
 def cart(self, user, proxy):
     site = abcmart.AbcMart("abcmart", "https://gs.abc-mart.net")
     site.cart(user)
Exemplo n.º 5
0
 def login(self, user, passwd):
     site = abcmart.AbcMart("abcmart", "https://gs.abc-mart.net")
     ret, _ = site.login(user, passwd)
     if not ret:
         logger.error("==Login Failed")
         sys.exit(1)
Exemplo n.º 6
0
 def order(self, user, passwd):
     site = abcmart.AbcMart("abcmart", "https://gs.abc-mart.net")
     site.login(user, passwd)
     site.submitOrder()
Exemplo n.º 7
0
 def get(self, gcode, token):
     site = abcmart.AbcMart("abcmart", "https://gs.abc-mart.net")
     # get product list
     pd = site.getProductData(gcode, token)
     for size, gcode in pd.items():
         print(size, gcode)
Exemplo n.º 8
0
url='https://app3.abc-mart.net/svc/mailLink/Login/?token=99c2ace05c6504fa349a0459b530ecd8'
import sys
sys.path.append('..')
from abcmart import abcmart


site =abcmart.AbcMart("abcmart","https://gs.abc-mart.net")
 

'''
POST https://app3.abc-mart.net/nativeAppApi/common/DeviceTokenAdd/ HTTP/1.1
'''
'''
'Host': 'app3.abc-mart.net',
'Accept': '*/*'
Authorization: Basic YXBwMzA6YWJjbWFydGFwcA==
App-Version: 3.5.2
Accept-Encoding: gzip;q=1.0, compress;q=0.5
OS: iOS 14.0.1
Accept-Language: zh-Hans-CN;q=1.0, en-CN;q=0.9, zh-Hant-CN;q=0.8
Content-Type: application/json
Content-Length: 301
User-Agent: ABC-MART APP
Connection: keep-alive
'''

'''
{"idToken":"a52c9f173a951a30800e200f1706312f64d7aa5737274175bef44abd87740ce8"}
{"deviceToken":"f208030061b3b3d17201e33b298fcfe3984b4e563e4b45c0150a9b4ea1fd0257","idToken":"a52c9f173a951a30800e200f1706312f64d7aa5737274175bef44abd87740ce8","deviceId":"f0fb248de9b2902e43117b044e14cdd2663f19ce57928eb2186c8d2143ac222ec57a3e319348e26333ed61db502cffa1b82aab85a7a4a590356bd20cab3a3096"}
'''
Exemplo n.º 9
0
def GetSite():
    return abcmart.AbcMart('abcmart','www.abc-mart.net')