import json


def login(driver, cookie_path):
    print('OK')
    driver.get('https://www.mcbbs.net/')
    print('OK')
    driver.delete_all_cookies()
    print('OK')
    with open(cookie_path, 'r') as cookief:
        cookieslist = json.load(cookief)
        for cookie in cookieslist:
            driver.add_cookie(cookie)
            print(cookie)
        print('OK')
