05-22-2010, 12:16 PM | #1966 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Last edited by Starson17; 05-22-2010 at 01:08 PM. |
|
05-22-2010, 12:58 PM | #1967 |
Connoisseur
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
|
|
05-22-2010, 01:00 PM | #1968 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
05-22-2010, 01:02 PM | #1969 |
Junior Member
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: sony
|
American Thinker recipe
http://www.americanthinker.com/
I tried doing the RSS way and it only downloads a few articles but it gets the titles for all the articles. If you click on various articles on the webpage there is no password/username asked for on several that I tried. Any help would be appreciated. |
05-22-2010, 01:59 PM | #1970 |
Connoisseur
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
|
|
05-23-2010, 04:02 AM | #1971 |
Junior Member
Posts: 2
Karma: 10
Join Date: May 2010
Device: lbook v3
|
Thanx. It's work.
|
05-23-2010, 08:29 AM | #1972 |
Kindle DX
Posts: 21
Karma: 10
Join Date: Aug 2009
Location: The Netherlands
Device: iPad and Kindle DX
|
Recipe for the UK Sunday paper: The Observer
Based almost 100% on the excellent Guardian recipe, this is my adapted version to allow the UK Sunday paper: The Observer to be added to Calibre.
|
05-23-2010, 10:57 AM | #1973 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup class Explosm(BasicNewsRecipe): title = 'Explosm' __author__ = 'Starson17' description = 'Explosm' language = 'en' use_embedded_content= False no_stylesheets = True linearize_tables = True oldest_article = 24 remove_javascript = True remove_empty_feeds = True max_articles_per_feed = 10 feeds = [ (u'Explosm Feed', u'http://feeds.feedburner.com/Explosm') ] def get_article_url(self, article): return article.get('link', None) keep_only_tags = [dict(name='div', attrs={'id':'maincontent'})] def preprocess_html(self, soup): table_tags = soup.findAll('table') table_tags[1].extract() NavTag = soup.find(text='« First') NavTag.parent.parent.extract() return soup extra_css = ''' h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;} h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;} p{font-family:Arial,Helvetica,sans-serif;font-size:small;} body{font-family:Helvetica,Arial,sans-serif;font-size:small;} ''' |
|
05-23-2010, 05:13 PM | #1974 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Improved Freakonomics Blog - Now with images!
Here's an updated Freakonomics Blog recipe. The built-in uses the print link, which, unfortunately, doesn't include images. This one has the images.
Code:
#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' from calibre.web.feeds.news import BasicNewsRecipe class Freakonomics(BasicNewsRecipe): title = 'Freakonomics Blog' description = 'The Hidden side of everything' __author__ = 'Starson17' language = 'en' cover_url = 'http://ilkerugur.files.wordpress.com/2009/04/freakonomics.jpg' feeds = [('Blog', 'http://feeds.feedburner.com/freakonomicsblog')] keep_only_tags = [dict(name='div', attrs={'id':'header'}), dict(name='h1'), dict(name='h2'), dict(name='div', attrs={'class':'entry-content'}), ] extra_css = ''' h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;} h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;} p{font-family:Arial,Helvetica,sans-serif;font-size:small;} body{font-family:Helvetica,Arial,sans-serif;font-size:small;} ''' |
05-24-2010, 01:12 AM | #1975 |
Junior Member
Posts: 4
Karma: 10
Join Date: May 2010
Device: none
|
I'm just getting started with Calibre and news feeds - I'd like to get the local news from our local newspaper. Using the RSS method, the articles have a dark blue background, making them impossible to read. The print link should work fine, but I find that the extra code is inserted in the middle of the link, and I'm not sure how to do that. (The example on the Calibre Help site only covers how to add the extra code at the beginning of the url)
Here's the url's in question Code:
http://www.sanluisobispo.com/2010/05/22/1150793/mixed-martial-arts-comes-to-poly.html Code:
http://www.sanluisobispo.com/2010/05/22/v-print/1150793/mixed-martial-arts-comes-to-poly.html Can anyone help or point me in the right direction? Thanks!!! |
05-24-2010, 03:37 AM | #1976 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
@Kovid - New recipe - American Thinker. |
|
05-24-2010, 04:05 AM | #1977 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Something like this Code:
def print_version(self, url): return url.replace('http://www.sanluisobispo.com/*/*/*/', 'http://www.sanluisobispo.com/*/*/*/v-print/') Good Luck Last edited by DoctorOhh; 05-24-2010 at 04:30 AM. |
|
05-24-2010, 03:25 PM | #1978 |
Connoisseur
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
|
new recipe
InfoMotori
Italian Auto, Motor and Sport News. |
05-24-2010, 03:59 PM | #1979 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Like this: Code:
def print_version(self, url): parts = url.split('/') print_url = 'http://' + parts[2] + '/' + parts[3] + '/' + parts[4] + '/' + parts[5] + '/' + parts[6] \ + '/v-print/' + parts[7] + '/' + parts[8] return print_url Last edited by Starson17; 05-24-2010 at 04:02 PM. |
|
05-24-2010, 11:57 PM | #1980 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
|
Similar Threads | ||||
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 |