View Single Post
Old 03-24-2012, 11:21 AM   #2
scissors
Addict
scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.
 
Posts: 241
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
Quote:
Originally Posted by JayKindle View Post
I am fetching some news from a website. But it seems it has this HTML code in between each paragraph causing my Kindle to see a large gap between the paragraphs.

Here is the HTML code:

Code:
<p>&nbsp;</p>
How can I write the remove_tags code to avoid this HTML code?
maybe

preprocess_regexps = [
(re.compile(r'<p>&nbsp;</p>', re.IGNORECASE | re.DOTALL), lambda match: '')]

and just dump it?
scissors is offline   Reply With Quote