import re
from sgmllib import SGMLParser, SGMLParseError
-from HTMLParser import HTMLParser
from BeautifulSoup import BeautifulSoup, CData
-
-
-class BSoupParser(HTMLParser):
- def __init__(self, charset, meta, title, refresh, icon):
- object.__init__(self)
- self.charset = charset
- self.meta_charset = meta
- self.title = title
- self.refresh = refresh
- self.icon = icon
+from parse_html_util import HTMLParser
# http://groups.google.com/group/beautifulsoup/browse_thread/thread/69093cb0d3a3cf63
else:
icon = None
- return BSoupParser(_charset, meta_charset, title, refresh, icon)
+ return HTMLParser(_charset, meta_charset, title, refresh, icon)
def _find_contenttype(Tag):
return (Tag.name == "meta") and \
--- /dev/null
+"""
+ HTML parsers utilities
+
+ Written by Broytman. Copyright (C) 2010 PhiloSoft Design
+"""
+
+from HTMLParser import HTMLParser
+
+class HTMLParser(HTMLParser):
+ def __init__(self, charset, meta_charset, title, refresh, icon):
+ object.__init__(self)
+ self.charset = charset
+ self.meta_charset = meta_charset
+ self.title = title
+ self.refresh = refresh
+ self.icon = icon