Пример #1
0
 def _extract_html_as_attachment(self, response, loader, xpath, name):
     text = HtmlXPathSelector(response).select(xpath).extract()
     text = clean_html('\n'.join(text))
     body = text.encode('utf-8')
     loader.add_value('_attachments', [(name, body, 'text/html')])