Skip to content

account.py

HiddenStrawberry edited this page May 12, 2017 · 1 revision

account.py


京东账户相关模块

Account是一个类,每实例化一个Account相当于新建了一个京东账户。

class Account:
    def __init__(self, username, pwd, rk_um, rk_pw)
    # 初始化京东用户名,密码,若快用户名,密码
    
    def login(self):
        return cookies
    #   京东M端登陆
    
    def login_pc(self):
        return cookies
    #   京东PC端登陆
    
    def get_payment(self):
        return payment_list 
    #   获取京东订单列表
    '''
    for each in payment_list:
        print each['orderID'],each['name'],each['address'],each['phone'],each['item'],each['sku']
    '''
        
    def get_msglist(self):
        return msglist
    #   获取消息中心最近的所有消息
    
    def get_couponlist(self):
        return couponlist
    #   获取优惠券列表
    
    def write_cookies(self, userid):
        writeCSVfile('cookies.csv')
    #   将Cookies追加写入cookies.csv
    
    def browser(self,url,cookies=None):
        return driver
    #   打开浏览器并写入Cookies
    
    def comment(self):
    #   批量商品评论
Clone this wiki locally