#!/usr/bin/env python2
from __future__ import absolute_import, division, print_function, unicode_literals

from datetime import datetime

from calibre.web.feeds.news import BasicNewsRecipe


class germant3n_latestnews(BasicNewsRecipe):
    # Titel of the Recipe
    title = 't3n.de News- latestnews - DE'
    cover_url = 'https://upload.wikimedia.org/wikipedia/commons/6/66/Logo_t3n_mit_Schriftzug.png'
    # Author
    __author__ = 'Volker Heggemann, VoHe'
    # oldes article to download (in days) 									---- can be edit by user
    oldest_article = 7
    # describes itself, 						 							---- can be edit by user
    max_articles_per_feed = 100
    # speed up the download on fast computers be carefull (I test max.20)
    # ---- can be edit by user
    simultaneous_downloads = 10
    # description, some Reader show this in titlepage
    description = u'News from t3n.de - there is a pro version too: https://t3n.de/pro/'
    # add date to description so for dayly downloads you can find them easier
    # ---- can be edit by user
    description = description + ' fetched: ' + \
        datetime.now().strftime("%Y-%m-%d")  # %H:%M:%S")
    # Who published the content?
    publisher = u't3n.de/social-media newsfeed'
    # What is the content of?
    category = u'Wir sind digitale Pioniere.'
    # describes itself, 						 							---- can be edit by user
    use_embedded_content = False
    # describes itself, 						 							---- can be edit by user
    language = 'de'
    # encoding of content. e.g. utf-8, None, ...
    # ---- can be edit by user
    # Removes javascript- why keep this, we only want static content
    remove_javascript = True
    # Removes empty feeds - why keep them!?
    remove_empty_feeds = True

    # remove the rubbish (in ebook)
    auto_cleanup = True
    # now the content description and URL follows
    # feel free to add, wipe out what you need	 							---- can be edit by user
    #
    # some of this are double
    #
    #
    # Make some tests, may you first comment all of them out, and step by step you add what you'll need?
    #

    feeds = [ # ('digitale Wirtschaft','https://t3n.de/tag/startups-wirtschaft/rss.xml'),
                ('Feedburner','https://t3n.de/rss.xml'),           
              # use comment block if you don't need something
              #  https://t3n.de/tag ... seems not to work anymore ;-(
              
           
    ]
