![]() |
#616 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Mar 2009
Location: Kenya
Device: Kindle DX
|
Am trying to run a test with the ForeignPolicy.com main feed. Have tried a number of variations, and think that this following snippet would be closest to what I want to get, but no love.
Code:
class AdvancedUserRecipe1248523694(BasicNewsRecipe): title = u'Foreign Policy Test' oldest_article = 15 max_articles_per_feed = 100 keep_only_tags = [dict(name='div', attrs={'id':'art-mast'}),dict(name='div', attrs={'id':'art-body'})] feeds = [(u'Main', u'http://www.foreignpolicy.com/node/feed')] def print_version(self, url): return url + '?print=yes&hidecomments=yes&page=full' Any thoughts? |
![]() |
![]() |
#617 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's a weird set of errors. Off the top of my head I'd say the pages being downloaded are not even HTML
The IndexErrors basically come from finding no html tags in the files |
![]() |
![]() |
#618 |
Reader Newb
![]() Posts: 7
Karma: 10
Join Date: Jul 2009
Location: Las Vegas, Nv
Device: PRS505
|
Thanks Kovid -
Okay just to be sure I re-read the FAQ and didn't see anything there about this maybe you can shed some light. Is there a way to (BESIDES creating a custom feed for each one) adjust the tags that are associated with recipes? For instance instead of having each one tagged as news AND the title ie: under collections I have 8 news and each one self titled Washington Post, Engadget, etc.. is there a easy way of omitting the Self Title and just tagging it as News for the Collections? Last edited by amerryman; 07-26-2009 at 11:57 PM. Reason: spelling |
![]() |
![]() |
#619 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not at the moment
|
![]() |
![]() |
#620 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jul 2009
Device: prs-505
|
Anyone done the http://www.dn.se
I would really love to be able to read the swedish news paper Dagens Nyheter on my prs-505. Anyone that have cocked this one?
www.dn.se feeds: http://www.dn.se/toppnyheter-rss http://www.dn.se/ekonomi-rss http://www.dn.se/sport-rss http://www.dn.se/debatt-rss http://www.dn.se/ledare-rss http://www.dn.se/kultur-rss BTW, Im running a news website (free and add free so this is not a pitch ![]() http://getnews.mine.nu |
![]() |
![]() |
#621 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Feb 2009
Device: non
|
Collection of Thai Newspapers.
http://www.norsorpor.com/chooseRSS.php I browse within each category, news are there. However, I cannot make them to LRFs. My codes are: Code:
class AdvancedUserRecipe1248726179(BasicNewsRecipe): title = u'NorSorPor' oldest_article = 7 max_articles_per_feed = 100 encoding = 'utf_8' no_stylesheets = True use_embedded_content = False remove_javascript = True remove_tags = [dict(name='td', attrs={'align':'right'})] remove_tags = [dict(name='td', attrs={'align':'left'})] html2lrf_options = ['--ignore-tables'] html2epub_options = 'linearize_tables = True' feeds = [ (u'Hot News', u'http://www.norsorpor.com/rss.php?category=1'), (u'Business', u'http://www.norsorpor.com/rss.php?category=3'), (u'Entertainment', u'http://www.norsorpor.com/rss.php?category=4'), (u'Around The World', u'http://www.norsorpor.com/rss.php?category=5'), (u'Sports', u'http://www.norsorpor.com/rss.php?category=6'), (u'Technology', u'http://www.norsorpor.com/rss.php?category=9'), (u'Premiere League', u'http://www.norsorpor.com/rss.php?category=21') ] Last edited by samgler; 07-27-2009 at 04:40 PM. |
![]() |
![]() |
#622 |
Member
![]() Posts: 20
Karma: 32
Join Date: Jan 2009
Device: Sony 700
|
Has anyone developed a recipe for Our Daily Bread? The website is http://www.rbc.org/odb/odb.shtml, and the RSS feed is http://www.rbc.org/rss.ashx?id=50398.
I've tried loading the RSS address into a custom news source, but all I get is a title page... Thanks! |
![]() |
![]() |
#623 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2009
Device: kindle 2
|
Please help me with a recipe for Project Syndicate:
http://www.project-syndicate.org http://www.project-syndicate.org/about_us/rss Thanks! |
![]() |
![]() |
#624 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Mar 2009
Location: Kenya
Device: Kindle DX
|
RE: threads #616/617
On the Foreign Policy feeds, very odd. Initially I thought there may have been an issue due to the javascript embedded in the print-friendly URLS. That said, if you try the feed direct, without rewriting the links (as my example did), you still get the same errors.
Has anyone tried this off of the ForeignPolicy Main feed (http://www.foreignpolicy.com/node/feed)?? Does not seem to be a problem with their other feeds. Would really like to get this working so any input is appreciated. Cheers |
![]() |
![]() |
#625 |
Member
![]() Posts: 15
Karma: 10
Join Date: Nov 2008
Device: prs505
|
Newsweek parse error
Seems that after upgrade to 6.0 the first couple of times I downloaded Newsweek it worked fine, now get the attached parse error. Something on my end? Windows Vista 32bit. Thanks for any help.
|
![]() |
![]() |
#626 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah newsweek started embedding some invalid XML content that is causing that error. Will be fixed in the next release.
|
![]() |
![]() |
#627 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 261
Karma: 134567
Join Date: Nov 2008
Device: Always in flux
|
Star Tribune
I would like to get a recipe for the Minneapolis Star Tribune. Thanks!
|
![]() |
![]() |
#628 |
Member
![]() Posts: 15
Karma: 10
Join Date: Nov 2008
Device: prs505
|
Newsweek + 0.6.3 = perfect
Thanks very much Kovid
|
![]() |
![]() |
#629 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2009
Location: Adelaide, Australia
Device: Hanlin V3
|
If anyone with advanced recipe knowledge can do a recipe for http://www.mcsweeneys.net/ I'd appreciate it.
Basic mode gets the content but also pages and pages of links to archive content which isn't in the feed. The site adds about 10 items every day so a recipe that get's the most recent 30 would suit me, and then I can just schedule it for every 3 days. Thanks K |
![]() |
![]() |
#630 |
Enthusiast
![]() Posts: 31
Karma: 58
Join Date: Nov 2008
Device: Sony 505
|
Kovid and Darko —
I am not skilled in recipes, and I believe I am doing something incorrect. What I wish to do is edit the UK papers' recipes to omit all categories except sport. (I am cricket and football fan living in the States.) However, when I try to edit the recipes, Calibre does not download anything. I first tried this with the Daily Mail to no success. Is there something I must do besides eliminating the code for other sections I do not want? This is what I reduced the code to: from calibre.web.feeds.news import BasicNewsRecipe class TheDailyMail(BasicNewsRecipe): title = u'The Daily Mail' oldest_article = 2 language = _('English') author = 'RufusA' simultaneous_downloads= 1 max_articles_per_feed = 50 extra_css = 'h1 {text-align: left;}' remove_tags = [ dict(name='ul', attrs={'class':'article-icons-links'}) ] remove_tags_after = dict(name='h3', attrs={'class':'social-links-title'}) remove_tags_before = dict(name='div', attrs={'id':'content'}) no_stylesheets = True feeds = [ (u'Sport', u'http://www.dailymail.co.uk/sport/index.rss')] def print_version(self, url): main = url.partition('?')[0] return main + '?printingPage=true' However, nothing occurs when I try to download the information. Thanks. Cheers. |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column read ? | pchrist7 | Calibre | 2 | 10-04-2010 02:52 AM |
Archive for custom screensavers | sleeplessdave | Amazon Kindle | 1 | 07-07-2010 12:33 PM |
How to back up preferences and custom recipes? | greenapple | Calibre | 3 | 03-29-2010 05:08 AM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |