| 1 |
# vim:fileencoding=utf-8 |
| 2 |
__license__ = 'GPL v3' |
| 3 |
__copyright__ = '2011-2013, Darko Miletic <darko.miletic at gmail.com>' |
| 4 |
''' |
| 5 |
www.pecat.co.rs |
| 6 |
''' |
| 7 |
|
| 8 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 9 |
|
| 10 |
|
| 11 |
class Pecat_rs(BasicNewsRecipe): |
| 12 |
title = 'Печат' |
| 13 |
__author__ = 'Darko Miletic' |
| 14 |
description = 'Интернет портал слободне Србије' |
| 15 |
publisher = 'NAŠ PEČAT A.D. BEOGRAD' |
| 16 |
oldest_article = 7 |
| 17 |
max_articles_per_feed = 100 |
| 18 |
language = 'sr' |
| 19 |
encoding = 'utf-8' |
| 20 |
no_stylesheets = True |
| 21 |
use_embedded_content = True |
| 22 |
masthead_url = 'http://www.pecat.co.rs/wp-content/themes/zenko-v1/images/logo.jpg' |
| 23 |
LOGIN = 'http://www.pecat.co.rs/' |
| 24 |
remove_empty_feeds = True |
| 25 |
ignore_duplicate_articles = {'url'} |
| 26 |
needs_subscription = 'optional' |
| 27 |
publication_type = 'magazine' |
| 28 |
extra_css = ''' |
| 29 |
body{font-family: Arial,Helvetica,sans1,sans-serif} |
| 30 |
img{display: block; margin-bottom: 1em; margin-top: 1em} |
| 31 |
p{display: block; margin-bottom: 1em; margin-top: 1em} |
| 32 |
''' |
| 33 |
|
| 34 |
conversion_options = {'comment': description, 'tags': 'politika, Srbija', 'publisher': 'Pecat', 'language': language} |
| 35 |
|
| 36 |
def get_browser(self): |
| 37 |
br = BasicNewsRecipe.get_browser(self) |
| 38 |
if self.username is not None and self.password is not None: |
| 39 |
br.open(self.LOGIN) |
| 40 |
br.select_form(name='loginform') |
| 41 |
br['log'] = self.username |
| 42 |
br['pwd'] = self.password |
| 43 |
br.submit() |
| 44 |
return br |
| 45 |
|
| 46 |
feeds = [ |
| 47 |
('Уводник', 'http://www.pecat.co.rs/category/uvodnik/feed/'), |
| 48 |
('Интервју', 'http://www.pecat.co.rs/category/intervju/feed/'), |
| 49 |
('Друштво', 'http://www.pecat.co.rs/category/drustvo/feed/'), |
| 50 |
('Регион', 'http://www.pecat.co.rs/category/region/feed/'), |
| 51 |
('Свет', 'http://www.pecat.co.rs/category/svet/feed/'), |
| 52 |
('Колумне', 'http://www.pecat.co.rs/category/kolumne/feed/'), |
| 53 |
('Култура', 'http://www.pecat.co.rs/category/kultura/feed/'), |
| 54 |
('Документи', 'http://www.pecat.co.rs/category/dokumenti/feed/'), |
| 55 |
('Репортаже', 'http://www.pecat.co.rs/category/reportaze/feed/'), |
| 56 |
('Економија', 'http://www.pecat.co.rs/category/ekonomija/feed/'), |
| 57 |
('Изјаве', 'http://www.pecat.co.rs/category/izjave/feed/'), |
| 58 |
('Преглед', 'http://www.pecat.co.rs/category/pregled/feed/'), |
| 59 |
('Сапутници', 'http://www.pecat.co.rs/category/saputnici/feed/'), |
| 60 |
('Сатира', 'http://www.pecat.co.rs/category/satira/feed/'), |
| 61 |
('Спорт', 'http://www.pecat.co.rs/category/sport/feed/'), |
| 62 |
('Павле Ћосић', 'http://www.pecat.co.rs/category/agencijske-vesti-pavle-cosic/feed/'), |
| 63 |
('ТВ Коментар', 'http://www.pecat.co.rs/category/tv-komentar/feed/'), |
| 64 |
('Вести', 'http://www.pecat.co.rs/category/vesti/feed/'), |
| 65 |
('Календар', 'http://www.pecat.co.rs/category/kalendar/feed/'), |
| 66 |
('Други Пишу', 'http://www.pecat.co.rs/category/drugi-pisu/feed/'), |
| 67 |
('Одбрана и безбедност', 'http://www.pecat.co.rs/category/odbrana-i-bezbednost/feed/'), |
| 68 |
] |