mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Courier Press by Krittika Goyal
This commit is contained in:
parent
4275fe65d3
commit
6a24c74e50
26
resources/recipes/courrier.recipe
Normal file
26
resources/recipes/courrier.recipe
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||||
|
|
||||||
|
class CourierPress(BasicNewsRecipe):
|
||||||
|
title = u'Courier Press'
|
||||||
|
language = 'en'
|
||||||
|
__author__ = 'Krittika Goyal'
|
||||||
|
oldest_article = 1 #days
|
||||||
|
max_articles_per_feed = 25
|
||||||
|
|
||||||
|
remove_stylesheets = True
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='iframe'),
|
||||||
|
]
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
('Courier Press',
|
||||||
|
'http://www.courierpress.com/rss/headlines/news/'),
|
||||||
|
]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
story = soup.find(name='div', attrs={'id':'article_body'})
|
||||||
|
soup = BeautifulSoup('<html><head><title>t</title></head><body></body></html>')
|
||||||
|
body = soup.find(name='body')
|
||||||
|
body.insert(0, story)
|
||||||
|
return soup
|
Loading…
x
Reference in New Issue
Block a user