|
|
#1 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2011
Device: Kindle 3
|
Request for site: The Christian Post
Hello,
I would appreciate someone setting up a custom recipe for The Christian Post. I attempted to do so and this is what I come up with. Thanks for any help provided! George edit: I actually think I got it figured out. If anyone has some adjustments they could recommend they will definitely be appreciated as this is my first recipe. Code:
__license__ = 'GPL v3'
__copyright__ = '2010, George Algozzini <galgoz at gmail.com>'
'''
Profile to download The Christian Post
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
class TheChristianPost(BasicNewsRecipe):
title = 'The Christian Post'
description = 'Homepage'
language = 'en'
no_stylesheets = True
use_embedded_content = False
oldest_article = 3
max_articles_per_feed = 25
remove_tags_before = dict(attrs={'id':'section'})
remove_tags_after = dict(attrs={'class':'banner468x60'})
remove_tags = [dict(attrs={'class':['relatedTopic', 'getfaceBook', 'plus', 'minus', 'tool', 'share', 'facebook', 'twitter', 'print', 'email', 'clear', 'relatedArticle']})]
extra_css = '''
h1 {color:#008852;font-family:Arial,Helvetica,sans-serif; font-size:20px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:18px;}
h2 {color:#4D4D4D;font-family:Arial,Helvetica,sans-serif; font-size:16px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:16px; }
'''
feeds = [
('Homepage', 'http://www.christianpost.com/services/rss/feed/'),
('Most Popular', 'http://www.christianpost.com/services/rss/feed/most-popular'),
('Entertainment', 'http://www.christianpost.com/services/rss/feed/entertainment/'),
('Politics', 'http://www.christianpost.com/services/rss/feed/politics/'),
('Living', 'http://www.christianpost.com/services/rss/feed/living/'),
('Business', 'http://www.christianpost.com/services/rss/feed/business/'),
('Opinion', 'http://www.christianpost.com/services/rss/feed/opinion/')
]
def get_article_url(self, article):
ans = BasicNewsRecipe.get_article_url(self, article)
return ans.partition('?')[0]
Last edited by galgoz; 06-03-2011 at 10:55 PM. Reason: I actually think I got it. |
|
|
|
|
|
#2 | |
|
Enthusiast
![]() Posts: 30
Karma: 12
Join Date: Jun 2011
Location: India
Device: Kindle 3g
|
Here's my recipe. I used the print version of the page so there's no clutter.
Quote:
![]() |
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2011
Device: Kindle 3
|
Sweet, thanks for posting. I noticed that the website was included in the latest update and appreciate your work on it.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Free book (Kindle/Nook/Christian Book) - The Dead Saint [Christian Thriller] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 10 | 07-30-2012 11:55 PM |
| Spiritual Unknown Christian: The Kneeling Christian. V1. 08-May-2010 | weatherwax | ePub Books | 0 | 05-08-2010 04:36 PM |
| New site for Christian eBooks with free audiobook | rebarnmom | Deals and Resources (No Self-Promotion or Affiliate Links) | 13 | 01-16-2009 04:21 AM |
| Review site design comment request | Shackbase | Lounge | 1 | 06-29-2005 09:05 PM |