mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update EPW
Merge branch 'master' of https://github.com/kannankarthik/calibre
This commit is contained in:
commit
734384b384
@ -1,33 +1,47 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2014-2015, Karthik <hashkendistro@gmail.com>, Krittika Goyal'
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class EconomicAndPoliticalWeekly(BasicNewsRecipe):
|
||||||
class Politics(BasicNewsRecipe):
|
title = 'Economic and Poitical Weekly'
|
||||||
title = u'Economic and Political Weekly'
|
__author__ = 'Karthik K, Krittika Goyal'
|
||||||
description = 'Economic and Political news from India'
|
description = 'Economic and Political news from India'
|
||||||
language = 'en_IN'
|
publisher = 'epw.in'
|
||||||
__author__ = 'Krittika Goyal'
|
category = 'news, finances, politics, India'
|
||||||
oldest_article = 15 # days
|
oldest_article = 7
|
||||||
max_articles_per_feed = 20
|
max_articles_per_feed = 100
|
||||||
use_embedded_content = False
|
|
||||||
|
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
auto_cleanup = True
|
use_embedded_content = False
|
||||||
|
simultaneous_downloads = 1
|
||||||
|
encoding = 'utf-8'
|
||||||
|
language = 'en_IN'
|
||||||
|
publication_type = 'newspaper'
|
||||||
|
#timefmt = ''
|
||||||
|
masthead_url = 'http://www.epw.in/system/files/epw_masthead.png'
|
||||||
|
extra_css = """
|
||||||
|
body{font-family: Arial,Helvetica,sans-serif}
|
||||||
|
"""
|
||||||
|
conversion_options = {'comment' : description,
|
||||||
|
'tags' : category,
|
||||||
|
'publisher' : publisher,
|
||||||
|
'language' : language
|
||||||
|
}
|
||||||
|
remove_tags_before = dict(name='h1', attrs={'class':'print-title'})
|
||||||
|
remove_tags_after = dict(name='div', attrs={'class':'print-content'})
|
||||||
|
remove_tags = [dict(name='div', attrs={'class':'terms'}),
|
||||||
|
dict(name='span', attrs={'class':'print-link'})]
|
||||||
|
feeds = [(u'Editorials', u'http://www.epw.in/taxonomy/term/1/feed'),
|
||||||
|
(u'Commentary', u'http://www.epw.in/taxonomy/term/3/feed'),
|
||||||
|
(u'Insight', u'http://www.epw.in/taxonomy/term/14/feed'),
|
||||||
|
(u'Book Reviews', u'http://www.epw.in/taxonomy/term/4/feed'),
|
||||||
|
(u'Perspectives', u'http://www.epw.in/taxonomy/term/5/feed'),
|
||||||
|
(u'Special Articles', u'http://www.epw.in/taxonomy/term/6/feed'),
|
||||||
|
(u'Discussion', u'http://www.epw.in/taxonomy/term/7/feed'),
|
||||||
|
(u'Web Exclusives', u'http://www.epw.in/taxonomy/term/11087/feed')]
|
||||||
|
|
||||||
feeds = [
|
def print_version(self, url):
|
||||||
|
return url.replace('http://www.epw.in', 'http://www.epw.in/print')
|
||||||
|
|
||||||
('Editorials', ' http://www.epw.in/feed/editorials.xml'),
|
def postprocess_html(self, soup, first_fetch):
|
||||||
|
return self.adeify_images(soup)
|
||||||
('Commentry', ' http://www.epw.in/feed/commentary.xml'),
|
|
||||||
|
|
||||||
('Insight', ' http://www.epw.in/feed/insight.xml'),
|
|
||||||
|
|
||||||
('Book Reviews', ' http://www.epw.in/feed/book-reviews.xml'),
|
|
||||||
|
|
||||||
('Perspectives', ' http://www.epw.in/feed/perspectives.xml'),
|
|
||||||
|
|
||||||
('Special Articles', ' http://www.epw.in/feed/special-articles.xml'),
|
|
||||||
|
|
||||||
('Discussion', ' http://www.epw.in/feed/discussion.xml'),
|
|
||||||
|
|
||||||
('Web Exclusives', ' http://www.epw.in/feed/web-exclusives.xml'),
|
|
||||||
]
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user