We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The rss-fetcher tries to generate a clearer error Exception for HTML by catching ExpatError exceptions and sniffing the top of the document:
ExpatError
p = sitemap_parser.XMLSitemapParser(url, text) try: sitemap = p.sitemap() except ExpatError: # try translateing ExpatError top = response.content[:1024].lower() if top.find(b'<!doctype') or top.find(b'<html'): raise Exception("html?") raise
Maybe pull this up into XMLSitemapParser.sitemap so that mc_sitemap_tools.discover (etc) can also benefit?
XMLSitemapParser.sitemap
mc_sitemap_tools.discover
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The rss-fetcher tries to generate a clearer error Exception for HTML by catching
ExpatError
exceptions and sniffing the top of the document:Maybe pull this up into
XMLSitemapParser.sitemap
so thatmc_sitemap_tools.discover
(etc) can also benefit?The text was updated successfully, but these errors were encountered: