Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 03-20-2012, 01:30 PM   #1
JayKindle
Connoisseur
JayKindle began at the beginning.
 
JayKindle's Avatar
 
Posts: 69
Karma: 10
Join Date: Sep 2011
Device: Kindle Fire HD 8
How to remove this tag?

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?
JayKindle is offline   Reply With Quote
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
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove author tag from comics BRGriff Recipes 13 12-30-2011 07:15 PM
Remove author tag persiomenezes Library Management 3 10-26-2011 04:41 PM
remove the "author tag" persiomenezes Library Management 2 10-23-2011 09:18 PM
Is it possible to remove the 'new' tag? nietsnut Amazon Kindle 9 08-23-2011 11:39 AM
remove tag alexxxm Calibre 1 01-18-2010 04:36 AM


All times are GMT -4. The time now is 09:28 AM.


MobileRead.com is a privately owned, operated and funded community.