mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
6d37f6f21e
@ -1,45 +0,0 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class ChowkRecipe(BasicNewsRecipe):
|
||||
__license__ = 'GPL v3'
|
||||
__author__ = 'kwetal'
|
||||
language = 'en_IN'
|
||||
version = 1
|
||||
|
||||
title = u'Chowk'
|
||||
publisher = u'chowk.com'
|
||||
category = u'Opinion, South Asia'
|
||||
description = u'Ideas & Identities of South Asia'
|
||||
|
||||
use_embedded_content = False
|
||||
remove_empty_feeds = True
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 100
|
||||
|
||||
remove_javascript = True
|
||||
encoding = 'utf-8'
|
||||
|
||||
feeds = []
|
||||
feeds.append(('Chowk Articles', 'http://www.chowk.com/rss'))
|
||||
|
||||
keep_only_tags = []
|
||||
keep_only_tags.append(dict(name='div', attrs={'id': 'content'}))
|
||||
|
||||
conversion_options = {'comments': description, 'tags': category, 'language': 'en',
|
||||
'publisher': publisher}
|
||||
|
||||
extra_css = '''
|
||||
body{font-family:verdana,arial,helvetica,geneva,sans-serif;}
|
||||
a {text-decoration: none; color: blue;}
|
||||
div.pgtitle {font-size: x-large; font-weight: bold;}
|
||||
div.wname, div.date {font-size: x-small; color: #696969;}
|
||||
div.wname {margin-top: 1em;}
|
||||
div.date {margin-bottom: 1em;}
|
||||
div.title {font-weight: bold;}
|
||||
'''
|
||||
|
||||
def print_version(self, url):
|
||||
main, sep, id = url.rpartition('/')
|
||||
|
||||
return main + '/print/' + id
|
@ -15,6 +15,7 @@ class IrishIndependent(BasicNewsRecipe):
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
ignore_duplicate_articles = {'url'}
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':lambda x: x and '_contentwrapper' in x})
|
||||
@ -26,7 +27,6 @@ class IrishIndependent(BasicNewsRecipe):
|
||||
|
||||
feeds = [
|
||||
('Frontpage News', 'http://www.independent.ie/rss'),
|
||||
('News', 'http://www.independent.ie/rss'),
|
||||
('World News', 'http://www.independent.ie/world-news/rss'),
|
||||
('Opinion', 'http://www.independent.ie/opinion/rss'),
|
||||
('Business', 'http://www.independent.ie/business/rss'),
|
||||
|
@ -32,12 +32,11 @@ class IrishTimes(BasicNewsRecipe):
|
||||
no_stylesheets = True
|
||||
temp_files = []
|
||||
keep_only_tags = [
|
||||
dict(name=['h1', 'h2']),
|
||||
classes('lead-art-wrapper article-body-wrapper byline-text'),
|
||||
classes('custom-headline custom-subheadline lead-art-wrapper article-body-wrapper byline-text'),
|
||||
]
|
||||
remove_tags = [
|
||||
dict(name='button'),
|
||||
classes('sm-promo-headline top-table-list-container'),
|
||||
classes('sm-promo-headline top-table-list-container single-divider interstitial-link'),
|
||||
]
|
||||
remove_attributes = ['width', 'height']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user