# Path: oembed/constants.py
# OEMBED_DEFAULT_PARSE_HTML = getattr(settings, 'OEMBED_DEFAULT_PARSE_HTML', True)
# 
# URL_RE = re.compile(URL_PATTERN)


import re
import oembed
from oembed.constants import OEMBED_DEFAULT_PARSE_HTML, URL_RE
from oembed.exceptions import OEmbedException
from oembed.parsers import text_parser, html_parser



class OEmbedConsumer(object):
    def parse(self, text, *args, **kwargs):
        if OEMBED_DEFAULT_PARSE_HTML:
            return self.parse_html(text, *args, **kwargs)
        else:

# Path: oembed/constants.py
# OEMBED_DEFAULT_PARSE_HTML = getattr(settings, 'OEMBED_DEFAULT_PARSE_HTML', True)
# 
# URL_RE = re.compile(URL_PATTERN)


# Path: oembed/consumer.py
import re
import oembed
from oembed.constants import OEMBED_DEFAULT_PARSE_HTML, URL_RE
from oembed.exceptions import OEmbedException
from oembed.parsers import text_parser, html_parser




class OEmbedConsumer(object):
    def parse(self, text, *args, **kwargs):
        if OEMBED_DEFAULT_PARSE_HTML:
            return self.parse_html(text, *args, **kwargs)
        else:

            return self.parse_text(text, *args, **kwargs)