| 1 |
#!/usr/bin/env python |
| 2 |
|
| 3 |
__license__ = 'GPL v3' |
| 4 |
__author__ = 'teepel <[email protected]>' |
| 5 |
|
| 6 |
''' |
| 7 |
http://www.osw.waw.pl - Osrodek studiow wschodnich |
| 8 |
''' |
| 9 |
|
| 10 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 11 |
|
| 12 |
|
| 13 |
class OSW_Recipe(BasicNewsRecipe): |
| 14 |
language = 'pl' |
| 15 |
title = 'Ośrodek Studiów Wschodnich' |
| 16 |
__author__ = 'teepel <[email protected]>' |
| 17 |
INDEX = 'http://www.osw.waw.pl' |
| 18 |
description = 'Ośrodek Studiów Wschodnich im. Marka Karpia. Centre for Eastern Studies.' |
| 19 |
category = 'News' |
| 20 |
oldest_article = 7 |
| 21 |
max_articles_per_feed = 100 |
| 22 |
cover_url = '' |
| 23 |
remove_empty_feeds = True |
| 24 |
no_stylesheets = True |
| 25 |
remove_javascript = True |
| 26 |
simultaneous_downloads = 5 |
| 27 |
|
| 28 |
keep_only_tags = [] |
| 29 |
keep_only_tags.append(dict(name='h2', attrs={'class': 'node-title'})) |
| 30 |
keep_only_tags.append(dict(name='div', attrs={'class': 'content clearfix'})) |
| 31 |
|
| 32 |
remove_tags = [] |
| 33 |
remove_tags.append(dict(name='table', attrs={'id': 'attachments'})) |
| 34 |
remove_tags.append(dict(name='div', attrs={'class': 'print-submitted'})) |
| 35 |
|
| 36 |
feeds = [('OSW', 'https://www.osw.waw.pl/pl/rss.xml')] |
| 37 |
|
| 38 |
def print_version(self, url): |
| 39 |
return url.replace('https://www.osw.waw.pl/pl/', 'https://www.osw.waw.pl/pl/print/') |