import re import datetime import struct import dateutil from HTMLParser import HTMLParser from lxml.html.diff import tokenize, fixup_ins_del_tags, htmldiff_tokens from lxml.etree import ParserError, XMLSyntaxError import lxml.html, lxml.etree from lxml.html.clean import Cleaner from itertools import chain from django.utils.dateformat import DateFormat from django.utils.html import strip_tags as strip_tags_django from utils.tornado_escape import linkify as linkify_tornado from utils.tornado_escape import xhtml_unescape as xhtml_unescape_tornado from vendor import reseekfile from utils import feedparser # COMMENTS_RE = re.compile('\') COMMENTS_RE = re.compile('\