lethain/extraction — pull request #1 by yaph (2013-01-24 23:02:14+00:00)
Title: Don't through exception when HTML title is empty, added test to make sur...

When extracting content from an HTML file with an empty title an exception occurs, see traceback below. To avoid this I added a call to filter to remove possible None values from data_values in the cleanup function. I also added a test.

```
Traceback (most recent call last):
File "tests/tests.py", line 123, in test_empty_title
extracted = self.extractor.extract(EMPTY_TITLE_HTML)
File "/home/ramiro/repos/pub/bookmark-tools/local/lib/python2.7/site-packages/extraction/__init__.py", line 248, in extract
return self.extracted_class(**self.cleanup(extracted, html, source_url=source_url))
File "/home/ramiro/repos/pub/bookmark-tools/local/lib/python2.7/site-packages/extraction/__init__.py", line 211, in cleanup
data_values = [self.cleanup_text(x) for x in data_values]
File "/home/ramiro/repos/pub/bookmark-tools/local/lib/python2.7/site-packages/extraction/__init__.py", line 183, in cleanup_text
return " ".join(value.split())
AttributeError: 'NoneType' object has no attribute 'split'
```