import re
from sgmllib import SGMLParser, SGMLParseError
from BeautifulSoup import BeautifulSoup, CData
+
from .bkmk_ph_util import HTMLParser
+from ..compat import string_type
DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic
else:
parts = []
for part in title:
- if not isinstance(part, basestring):
+ if not isinstance(part, string_type):
part = part.decode()
parts.append(part.strip())
title = ''.join(parts)
from bs4 import BeautifulSoup
+
from .bkmk_ph_util import HTMLParser
+from ..compat import string_type
universal_charset = "utf-8"
DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic
else:
parts = []
for part in title:
- if not isinstance(part, basestring):
+ if not isinstance(part, string_type):
part = part.decode()
parts.append(part.strip())
title = ''.join(parts)