Read die tageszeitung Print on your iPad or Kindle in no time. Click download to load the free ebook on your reader.

Check out all the available public recipes or write your own with these quick start guides. ReadBeam is built on calibre, so everything in the docs and the fora applies here as well.

Download for free »

Printausgabe - Kostenpflichtig. die tageszeitung (taz) ist eine überregionale Tageszeitung in Deutschland. Sie wurde 1978 in West-Berlin als linkes, selbstverwaltetes Zeitungsprojekt gegründet. Alle Abonnements schließen die deutsche Ausgabe der Monatszeitung Le Monde diplomatique mit ein.

Language: de

Requires Subscription: Yes, requires a die tageszeitung Print subscription

Schedule Every morning

			  #!/usr/bin/env  python
# -*- coding: utf-8 -*-

__license__   = 'GPL v3'
__copyright__ = '2010, Lars Jacob jacob.lars at gmail.com'
__docformat__ = 'restructuredtext de'

'''
www.taz.de/digiabo
'''
import os, urllib2, zipfile
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ptempfile import PersistentTemporaryFile

class TazDigiabo(BasicNewsRecipe):

    title = u'Taz Digiabo'
    description = u'Das EPUB DigiAbo der Taz'
    language = 'de'
    lang = 'de-DE'

    __author__ = 'Lars Jacob'
    needs_subscription = True

    conversion_options = {
        'no_default_epub_cover' : True
    }

    def build_index(self):
        domain = "http://dl.taz.de"

        url = domain + "/epub/"

        auth_handler = urllib2.HTTPBasicAuthHandler()
        auth_handler.add_password(realm='TAZ-ABO',
                                    uri=url,
                                    user=self.username,
                                    passwd=self.password)
        opener = urllib2.build_opener(auth_handler)
        urllib2.install_opener(opener)

        try:
            f = urllib2.urlopen(url)
        except urllib2.HTTPError:
            self.report_progress(0,_('Can\'t login to download issue'))
            raise ValueError('Failed to login, check your username and'
                    ' password')

        tmp = PersistentTemporaryFile(suffix='.epub')
        self.report_progress(0,_('downloading epub'))
        tmp.write(f.read())
        tmp.close()

        zfile = zipfile.ZipFile(tmp.name, 'r')
        self.report_progress(0,_('extracting epub'))

        zfile.extractall(self.output_dir)

        tmp.close()
        index = os.path.join(self.output_dir, 'content.opf')

        self.report_progress(1,_('epub downloaded and extracted'))

        return index