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 11-01-2010, 10:26 PM   #1
Pmykland
Junior Member
Pmykland began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2010
Device: Kindle3
Need Help Minneapolis Star Tribune

Hey folks
I am trying to get the following recipe cleaned up but I am having problems with the last part

Here is the recipe
class AdvancedUserRecipe1288138924(BasicNewsRecipe):
title = u'StarTribune'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False

feeds = [(u'Nation', u'http://www.startribune.com/nation/index.rss2'), (u'Local', u'http://www.startribune.com/local/index.rss2'), (u'Sports', u'http://www.startribune.com/sports/index.rss2'), (u'Politics', u'http://www.startribune.com/politics/national/index.rss2'),(u'Entertainment', u'http://www.startribune.com/entertainment/index.rss2'),(u'Business', u'http://www.startribune.com/business/index.rss2')]
remove_javascript = True
use_embedded_content = False
no_stylesheets = True
masthead_url = 'http://stmedia.startribune.com/designimages/FlagLogo081610.png'

keep_only_tags = [
dict(name='div', attrs={'class':'columnOne'}),
]
remove_tags = [
dict(name='div', attrs={'class':'sidebar'}),
dict(name='div', attrs={'class':'pager'}),
dict(name='div', attrs={'class':'nextStoryBlock'}),
dict(name='p', attrs={'class':'sectionpath'}),



]
remove_tags_after = dict(name='h2')

I am trying to remove all of the comments blocks after the article by using remove tags after "h2". I also want to get the "h2" tags omitted, it only says "more ...News" depending on the the feed.

How can I remove the h2 tag and remove the code after the h2 tag in the same recipe?

Thanks in advance
Pmykland is offline   Reply With Quote
Old 11-01-2010, 11:33 PM   #2
nickredding
onlinenewsreader.net
nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'
 
Posts: 324
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
Add dict(name='h2') to your remove_tags list
nickredding is offline   Reply With Quote
Advert
Old 11-04-2010, 09:07 PM   #3
Pmykland
Junior Member
Pmykland began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2010
Device: Kindle3
So Simple and yet...

Thanks
Pmykland is offline   Reply With Quote
Old 07-20-2022, 03:47 PM   #4
mrecom
Member
mrecom began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jul 2022
Device: Kobo Clara HD
Quote:
Originally Posted by Pmykland View Post
Thanks
Any chance you still have a recipe that currently works with the strib? I tried above one with fix and it doesn't actually pull the article content. Only pulls headlines.
mrecom is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Greetings From The Twin Cities of Minneapolis and St. Paul Toadmanor Introduce Yourself 9 07-07-2013 04:26 PM
Meet-Up! Minneapolis, Minnesota, USA Fledchen Lounge 2 01-21-2010 02:50 PM
Hi from Minneapolis,MN poodlespal Introduce Yourself 7 05-06-2009 10:45 AM
Hello from Minneapolis chuckj Introduce Yourself 3 03-07-2009 04:29 PM
Star Trek vs. Star Wars daffy4u Lounge 48 12-04-2008 10:06 AM


All times are GMT -4. The time now is 05:38 AM.


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