# Path: base/config.py

# 
# Path: auth/exceptions.py
# class OOIAuthException(OOIBaseException):
#     pass


import aiohttp
import asyncio
import json
import re
import time
from urllib.parse import urlparse, parse_qs
from base import config
from auth.exceptions import OOIAuthException
            raise OOIAuthException('DMM修改登录机制了，请通知管理员处理')
        return self.token, self.idKey, self.pwdKey

    @asyncio.coroutine
    def _get_osapi_url(self):
        """登录DMM账号，并转到《舰队collection》游戏页面，获取内嵌游戏网页的地址。

        :return: str
        """
        del self.headers['http-dmm-token']
        del self.headers['X-Requested-With']
        data = {'login_id': self.login_id,
                'password': self.password,
                'token': self.token,
                'idKey': self.login_id,
                'pwKey': self.password}
        response = yield from self._request(self.urls['auth'], method='POST', data=data,
                                       timeout_message='连接DMM认证网页失败')
        html = yield from response.text()
        m = self.patterns['reset'].search(html)
        if m:
            raise OOIAuthException('DMM强制要求用户修改密码')

        response = yield from self._request(self.urls['game'],
                                       timeout_message='连接舰队collection游戏页面失败')
        html = yield from response.text()
        m = self.patterns['osapi'].search(html)
        if m:
            self.osapi_url = m.group(1)
        else:

# Path: base/config.py

# 
# Path: auth/exceptions.py
# class OOIAuthException(OOIBaseException):
#     pass


# Path: auth/kancolle.py
import aiohttp
import asyncio
import json
import re
import time
from urllib.parse import urlparse, parse_qs
from base import config
from auth.exceptions import OOIAuthException

            raise OOIAuthException('DMM修改登录机制了，请通知管理员处理')
        return self.token, self.idKey, self.pwdKey

    @asyncio.coroutine
    def _get_osapi_url(self):
        """登录DMM账号，并转到《舰队collection》游戏页面，获取内嵌游戏网页的地址。

        :return: str
        """
        del self.headers['http-dmm-token']
        del self.headers['X-Requested-With']
        data = {'login_id': self.login_id,
                'password': self.password,
                'token': self.token,
                'idKey': self.login_id,
                'pwKey': self.password}
        response = yield from self._request(self.urls['auth'], method='POST', data=data,
                                       timeout_message='连接DMM认证网页失败')
        html = yield from response.text()
        m = self.patterns['reset'].search(html)
        if m:
            raise OOIAuthException('DMM强制要求用户修改密码')

        response = yield from self._request(self.urls['game'],
                                       timeout_message='连接舰队collection游戏页面失败')
        html = yield from response.text()
        m = self.patterns['osapi'].search(html)
        if m:
            self.osapi_url = m.group(1)
        else:

            raise OOIAuthException('用户名或密码错误，请重新输入')