![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2015
Device: Kindle
|
Remove child tag
I wonder how to remove all child tag from a parent tag with a particular ID.
I tried to use remove_tag and remove_tag_after, but it seems not working in this way. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,310
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Implement prepocess_html in your recipe. There you can do anything you like using the full beautifulsoup api
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Feb 2015
Device: Kindle
|
I would like to remove the text "<br>" inside content attribute of <meta> tag as below:
<h1 id="article-title" class="sub_ex_article-title"> sometext<br> <meta content="sometext<br>" name="title"> </h1> The child is malformed and I can't remove the <br> with prepocess_html, coz BeautifulSoup doesn't seems to work with this malformed HTML. Should I use prepocess_raw_html? And is there any sample code available? How can I remove the whole line of <meta>... name="title"> ? Thanks ![]() Last edited by Apollo Mok; 02-25-2015 at 09:33 PM. |
![]() |
![]() |
![]() |
Tags |
tag remove |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to remove this tag? | JayKindle | Recipes | 1 | 03-24-2012 11:21 AM |
Remove author tag | persiomenezes | Library Management | 3 | 10-26-2011 04:41 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 |