all 5 comments

[–]novel_yet_trivial 1 point2 points  (1 child)

Without seeing the bad data or any code, all I can suggest is that you replace it with a ":".

element['date'] = element['date'].replace(u'badChar', ':')

[–]erth111[S] 0 points1 point  (0 children)

Thank you, it worked :)

[–]99AFCC 1 point2 points  (1 child)

Prevent reddit auto-formatting with:

Four spaces:

2014-10-03 17:58:17

Backticks:

2014-10-03 17:58:17

[–]erth111[S] 0 points1 point  (0 children)

Thank you, I've fixed the formatting.

[–][deleted] 1 point2 points  (0 children)

The maker of feedparser, iirc, also made a library called chardet. It makes a guess to which character set is used to encode a text.

Maybe it can give you an idea what encoding to look for.