# -*- coding: utf-8 -*-

from calibre.web.feeds.news import BasicNewsRecipe

class SHaberTekno (BasicNewsRecipe):

    title               = u'Samanyolu Teknoloji'
    __author__            = u'thomass'
    description            = 'Samanyolu Teknoloji Haber Sitesinden  haberler '
    oldest_article         =8
    max_articles_per_feed  =100
    no_stylesheets         = True
    #delay                  = 1
    #use_embedded_content   = False
    encoding               = 'utf-8'
    publisher              = 'thomass'
    category               = 'bilim, teknoloji, haber, türkçe'
    language               = 'tr'
    publication_type = 'magazine'

    conversion_options = {
                            'tags'            : category
                            ,'language'        : language
                            ,'publisher'       : publisher
                            ,'linearize_tables': True
                         }
    extra_css              = ' .IcerikMetin{ font-family:sans-serif;font-weight: normal;font-size: 10px } .h1IcerikBaslik {font-weight: bold; font-size: 18px}' #.story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
    
   #extra_css              = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
    keep_only_tags    = [dict(name='div', attrs={'class':['IcerikBaslik','IcerikMetinDiv']})]#,dict(name='span', attrs={'class':['agenda2Title']}),dict(name='div', attrs={'id':['gallery']})]
    #remove_tags  = [dict(name='img', attrs={'src':[ 'http://medya.aksiyon.com.tr/aksiyon/images/logo/logo.bmp','/aksiyon/images/template/green/baslik0.gif','mobile/home.jpg']}) ]

    cover_img_url = 'http://teknoloji.samanyoluhaber.com/resources/images/logo_s_digi.jpg'
    masthead_url = 'http://teknoloji.samanyoluhaber.com/resources/images/logo_s_digi.jpg'
    remove_empty_feeds= True
    #remove_attributes = ['width','height']

    feeds          = [
                      ( u'GENEL', u'http://podcast.samanyoluhaber.com/Teknoloji.rss'),
                      ( u'İNTERNET', u'http://open.dapper.net/services/shaberteknolojiinternet'),
                      ( u'CEP TELEFONU', u'http://open.dapper.net/services/shaberteknolojicep'),
                      ( u'OYUN', u'http://open.dapper.net/services/shaberteknolojioyun'),
                      ( u'DONANIM', u'http://open.dapper.net/services/httpopendappernetservicesshaberteknolojidonanim'),
                      ( u'ÜRÜN İNCELEME', u'http://open.dapper.net/services/shaberteknolojiurun'),
                      ( u'ALIŞVERİŞ', u'http://open.dapper.net/services/shaberteknolojialisveris'),
                      ( u'BİLİM & TEKNOLOJİ', u'http://open.dapper.net/services/shaberteknolojibilim'),
                      ( u'HABERLER', u'http://open.dapper.net/services/shaberteknolojihaber'),
                     


                        ]

   # def print_version(self, url):
    # return url.replace('http://www.aksiyon.com.tr/aksiyon/newsDetail_getNewsById.action?load=detay&', 'http://www.aksiyon.com.tr/aksiyon/mobile_detailn.action?')

