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-18-2011, 02:18 PM   #1
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
Trouble removing span class

This is in my recipe
remove_tags = [dict(name='span', attrs={'class':'articledate'})]

Below is the relevant piece of html of one of the pages. Why does this not remove the dates ?
Thanks

Spoiler:
<ul class="calibrefeedlist"><li id="article_0" class="calibrerescale1">
<a href="article_0/index_u15.html" class="article">Almond Shortbread</a><span class="articledate"> [Sat, 04 Dec 11:12]</span>
</li>
<li id="article_1" class="calibrerescale1">
<a href="article_1/index_u31.html" class="article">Heart Healthy Chocolate Chip Cookies</a><span class="articledate"> [Sat, 04 Dec 11:12]</span>
</li>
<li id="article_2" class="calibrerescale1">
<a href="article_2/index_u12.html" class="article">Oven-Baked Chocolate Chip Cookies</a><span class="articledate"> [Thu, 02 Dec 11:12]</span>
</li>
<li id="article_3" class="calibrerescale1">
<a href="article_3/index_u35.html" class="article">cookies 4</a><span class="articledate"> [Thu, 02 Dec 11:12]</span>
</li>
<li id="article_4" class="calibrerescale1">
<a href="article_4/index_u28.html" class="article">cookies 5</a><span class="articledate"> [Thu, 02 Dec 11:12]</span>
</li>
</ul>
mufc is offline   Reply With Quote
Old 03-18-2011, 02:21 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Because remove_tags does not apply to calibre generated content
kovidgoyal is online now   Reply With Quote
Advert
Old 03-18-2011, 02:22 PM   #3
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by mufc View Post
This is in my recipe
remove_tags = [dict(name='span', attrs={'class':'articledate'})]

Below is the relevant piece of html of one of the pages. Why does this not remove the dates ?

<ul class="calibrefeedlist">
You have quoted and are looking at the output html, but remove_tags operates on the input html. They can be significantly different. You have to match the html of the input.
Starson17 is offline   Reply With Quote
Old 03-18-2011, 03:29 PM   #4
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
Thanks
Sometimes something as obvious as that sometimes needs another eye
mufc is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-650 SD Card Importance? SDHC, SDHC Class 4, Class 10 etc is it important Renji Sony Reader 11 12-03-2011 12:30 PM
Why define a paragraph as a span with no different or extra formatting? bfollowell ePub 7 03-16-2011 10:30 PM
'Heading color' and 'p class span' mufc Recipes 7 12-22-2010 09:02 PM
Span tags, h1s and emspaces ConorHughes ePub 11 09-30-2010 05:00 PM
STREET & CLAIRVOYANCE by Ryan A. Span Winter Self-Promotions by Authors and Publishers 36 09-01-2010 11:09 AM


All times are GMT -4. The time now is 06:55 PM.


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