View Single Post
Old 02-28-2011, 05:33 PM   #1
bubak
Connoisseur
bubak began at the beginning.
 
Posts: 65
Karma: 10
Join Date: Dec 2010
Device: kindle voyage
Different encodings in one news source

I've got a news source that uses different encodings for different feeds and the automated detection does not get it right sometimes. Any ideas how to handle this? I read in the manual that 'encoding' can be callable with two arguments but I'm not sure what the 'source' as second argument means - feed source or article source? If it is downloaded article source, i can do something like source.decode(enc, 'replace'), however where do I get the current feed URL? Or is the second argument some article object?
bubak is offline   Reply With Quote