View Single Post
Old 01-23-2011, 04:12 AM   #1
Pitris81
Junior Member
Pitris81 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
Removing tag problem

Hello,

I´m newbie in recipes. I try to remove this tags <hr/> and <strong> but without succes. Please could anyone help me where is problem?

I try use
Code:
remove_tags = [dict(name='strong')]
My reciepe

Code:
class AdvancedUserRecipe1295692921(BasicNewsRecipe):
    title          = u'E15 - KindleFriendly beta 1'
    oldest_article = 2
    max_articles_per_feed = 100
    no_stylesheets = True
    extra_css      = '.perex {text-align: justifiy; font-style: italic;}'
 
    keep_only_tags = [dict(name='div', attrs={'id':'article'})]
    remove_tags = [dict(name='hr')]
    remove_tags = [dict(name='strong')]
    remove_tags = [dict(name='div', attrs={'class':['art-box related', 'social box', 'related',  'story-feature wide ', 'story-feature narrow']}) ]




    feeds          = [(u'E15 zpravy RSS', u'http://www.e15.cz/rss/vse')]
Source

Code:
<p>
ABL se od září s vydavatelem MfD, společností MAFRA, soudí o 35 milionů korun, uvedl Bárta. Jde údajně o škodu, když ABL chtěla prodat svou detektivní divizi a informace o sledování politiků snížily její cenu. Bárta zdůraznil, že ABL divizi do poloviny února prodá bez ohledu na ekonomické ztráty. 

</p>
<hr/>

<p>

<strong>Dále čtěte: <a href="http://zpravy.e15.cz/nazory/profily/tajnosti-starosty-dalibora-mlejnskeho" class="art-urlext" onclick="mfPageTracker._trackEvent('Text s linkami', 'Linky v textu', 'Kliknutí na link v textu')" title="http://zpravy.e15.cz/nazory/profily/tajnosti-starosty-dalibora-mlejnskeho"  rel="nofollow">Tajnosti starosty Dalibora Mlejnského</a></strong>
</p>
<hr/>

<p>

I would like to cut text between <strong> a and horizontal lines
Thanks for help
Pitris81 is offline   Reply With Quote