# Path: btceapi/common.py
# def parseJSONResponse(response):
#     def parse_decimal(var):
#     def __init__(self, timeout=30):
#     def close(self):
#     def getCookie(self):
#     def makeRequest(self, url, extra_headers=None, params="", with_cookie=False):
#     def makeJSONRequest(self, url, extra_headers=None, params=""):
# def validatePair(pair):
# def validateOrder(pair, trade_type, rate, amount):
# def truncateAmountDigits(value, digits):
# def truncateAmount(value, pair):
# def formatCurrencyDigits(value, digits):
# def formatCurrency(value, pair):
# HEADER_COOKIE_RE = re.compile(r'__cfduid=([a-f0-9]{46})')
# BODY_COOKIE_RE = re.compile(r'document\.cookie="a=([a-f0-9]{32});path=/;";')
# class BTCEConnection:


from HTMLParser import HTMLParser
from btceapi.common import BTCEConnection, all_pairs
import datetime
import warnings


class ScraperResults(object):
    __slots__ = ('messages', 'reserves24change', 'reservesALFAcashier',
                 'usersOnline', 'botsOnline', 'devOnline', 'supportOnline',
                 'adminOnline')

    def __init__(self):
        self.messages = None
        self.reserves24change = None
        self.reservesALFAcashier = None
        self.usersOnline = None
        self.botsOnline = None
        self.devOnline = False
        self.supportOnline = False
        self.adminOnline = False

    def __getstate__(self):
        return dict((k, getattr(self, k)) for k in ScraperResults.__slots__)

    def __setstate__(self, state):
        for k, v in state.items():
            setattr(self, k, v)


_current_pair_index = 0


def scrapeMainPage(connection=None):
    if connection is None:

# Path: btceapi/common.py
# def parseJSONResponse(response):
#     def parse_decimal(var):
#     def __init__(self, timeout=30):
#     def close(self):
#     def getCookie(self):
#     def makeRequest(self, url, extra_headers=None, params="", with_cookie=False):
#     def makeJSONRequest(self, url, extra_headers=None, params=""):
# def validatePair(pair):
# def validateOrder(pair, trade_type, rate, amount):
# def truncateAmountDigits(value, digits):
# def truncateAmount(value, pair):
# def formatCurrencyDigits(value, digits):
# def formatCurrency(value, pair):
# HEADER_COOKIE_RE = re.compile(r'__cfduid=([a-f0-9]{46})')
# BODY_COOKIE_RE = re.compile(r'document\.cookie="a=([a-f0-9]{32});path=/;";')
# class BTCEConnection:


# Path: btceapi/scraping.py
from HTMLParser import HTMLParser
from btceapi.common import BTCEConnection, all_pairs
import datetime
import warnings



class ScraperResults(object):
    __slots__ = ('messages', 'reserves24change', 'reservesALFAcashier',
                 'usersOnline', 'botsOnline', 'devOnline', 'supportOnline',
                 'adminOnline')

    def __init__(self):
        self.messages = None
        self.reserves24change = None
        self.reservesALFAcashier = None
        self.usersOnline = None
        self.botsOnline = None
        self.devOnline = False
        self.supportOnline = False
        self.adminOnline = False

    def __getstate__(self):
        return dict((k, getattr(self, k)) for k in ScraperResults.__slots__)

    def __setstate__(self, state):
        for k, v in state.items():
            setattr(self, k, v)


_current_pair_index = 0


def scrapeMainPage(connection=None):
    if connection is None:

        connection = BTCEConnection()