# Path: tabun_api/compat.py
# PY2 = sys.version_info.major == 2


import re
import sys
import time
import random
import logging
import platform
import mimetypes
import lxml
import lxml.html
import lxml.etree
import iso8601
    import warnings
        import Image
        import imp
        import importlib
        import importlib.util
    import socks
from hashlib import md5
from .compat import text, text_types, binary, urequest, PY2, BaseCookie
        from PIL import Image
    from io import BytesIO
        from urlparse import urlparse
        from urllib.parse import urlparse
        d ef
        g
    """

    NEWLINE = -1
    block_elems = ("div", "p", "blockquote", "section", "ul", "li", "h1", "h2", "h3", "h4", "h5", "h6")

    fancy = True
    strike_mode = 'unicode'
    vk_links = False
    disable_links = False

    def __init__(self, params=None):
        for k in ('fancy', 'strike_mode', 'vk_links', 'disable_links'):
            if params and k in params:
                setattr(self, k, params[k])

    def format(self, node, with_cutted=True):
        """Форматирует lxml-элемент.

        :param node: сам lxml-элемент
        :param bool with_cutted: если False, обработка будет прекращена после
          натыкания на тег-кат (когда :func:`~tabun_api.utils.is_cut` вернёт True)
        :rtype: строка
        """

        return self.format_part(node, with_cutted)[1]

    def format_part(self, node, with_cutted=True):
        if isinstance(node, text_types):

# Path: tabun_api/compat.py
# PY2 = sys.version_info.major == 2


# Path: tabun_api/utils.py
import re
import sys
import time
import random
import logging
import platform
import mimetypes
import lxml
import lxml.html
import lxml.etree
import iso8601
    import warnings
        import Image
        import imp
        import importlib
        import importlib.util
    import socks
from hashlib import md5
from .compat import text, text_types, binary, urequest, PY2, BaseCookie
        from PIL import Image
    from io import BytesIO
        from urlparse import urlparse
        from urllib.parse import urlparse

        d ef
        g
    """

    NEWLINE = -1
    block_elems = ("div", "p", "blockquote", "section", "ul", "li", "h1", "h2", "h3", "h4", "h5", "h6")

    fancy = True
    strike_mode = 'unicode'
    vk_links = False
    disable_links = False

    def __init__(self, params=None):
        for k in ('fancy', 'strike_mode', 'vk_links', 'disable_links'):
            if params and k in params:
                setattr(self, k, params[k])

    def format(self, node, with_cutted=True):
        """Форматирует lxml-элемент.

        :param node: сам lxml-элемент
        :param bool with_cutted: если False, обработка будет прекращена после
          натыкания на тег-кат (когда :func:`~tabun_api.utils.is_cut` вернёт True)
        :rtype: строка
        """

        return self.format_part(node, with_cutted)[1]

    def format_part(self, node, with_cutted=True):
        if isinstance(node, text_types):

            return False, text(node)