calibre/recipes/samanyolu_haber.recipe
Kovid Goyal 567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30

54 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
from calibre.web.feeds.news import BasicNewsRecipe
class SHaber (BasicNewsRecipe):
title = u'Samanyolu Haber'
__author__ = u'thomass'
description = ' Samanyolu Haber Sitesinden günlük haberler '
oldest_article = 2
max_articles_per_feed = 100
no_stylesheets = True
auto_cleanup = True
encoding = 'utf-8'
publisher = 'thomass'
category = 'güncel, haber, türkçe'
language = 'tr'
publication_type = 'newspaper'
conversion_options = {
'tags': category, 'language': language, 'publisher': publisher, 'linearize_tables': True
}
extra_css = ' .Haber-Baslik-Yazisi {font-weight: bold; font-size: 9px} .Haber-Ozet-Yazisi{ font-family:sans-serif;font-weight: normal;font-size: 11px } #Haber{ font-family:sans-serif;font-weight: normal;font-size: 9px }.KirmiziText{ font-weight: normal;font-size: 5px }' # noqa
cover_img_url = 'http://www.samanyoluhaber.com/include/logo.png'
masthead_url = 'http://www.samanyoluhaber.com/include/logo.png'
remove_empty_feeds = True
feeds = [
(u'Son Dakika', u'http://podcast.samanyoluhaber.com/sondakika.rss'),
(u'Gündem', u'http://podcast.samanyoluhaber.com/gundem.rss'),
(u'Politika ', u'http://podcast.samanyoluhaber.com/politika.rss'),
(u'Ekonomi', u'http://podcast.samanyoluhaber.com/ekonomi.rss'),
(u'Dünya', u'http://podcast.samanyoluhaber.com/dunya.rss'),
(u'Spor ', u'http://podcast.samanyoluhaber.com/spor.rss'),
(u'Sağlık', u'http://podcast.samanyoluhaber.com/saglik.rss'),
(u'Kültür', u'http://podcast.samanyoluhaber.com/kultur.rss'),
(u'Eğitim', u'http://podcast.samanyoluhaber.com/egitim.rss'),
(u'Ramazan', u'http://podcast.samanyoluhaber.com/ramazan.rss'),
(u'Yazarlar ', u'http://podcast.samanyoluhaber.com/yazarlar.rss'),
]
def preprocess_html(self, soup):
for alink in soup.findAll('a'):
if alink.string is not None:
tstr = alink.string
alink.replaceWith(tstr)
return soup