Aktueller Stand, bloede Warnung zu falschem Cert des Tivo wegmachen
This commit is contained in:
parent
3e68c5aefb
commit
aa7df458ac
1 changed files with 15 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/local/bin/python
|
#!/usr/local/bin/python
|
||||||
|
|
||||||
# $Schlepperbande: src/tivomirror/tivomirror,v 1.65 2014/07/12 13:59:46 stb Exp $
|
# $Schlepperbande: src/tivomirror/tivomirror,v 1.66 2014/07/12 14:39:48 stb Exp $
|
||||||
#
|
#
|
||||||
# Stefans Script, um die Sendungen vom Tivo runterzuladen und in MPEG4
|
# Stefans Script, um die Sendungen vom Tivo runterzuladen und in MPEG4
|
||||||
# zu transkodieren.
|
# zu transkodieren.
|
||||||
|
@ -35,7 +35,7 @@ import tivomp4
|
||||||
host = "tivo.lassitu.de"
|
host = "tivo.lassitu.de"
|
||||||
#host = "wavehh.lassitu.de:30080"
|
#host = "wavehh.lassitu.de:30080"
|
||||||
mak = "7194378159"
|
mak = "7194378159"
|
||||||
targetdir = "/p1/media/TV"
|
targetdir = "/p2/media/video/TV"
|
||||||
gig = 1024.0 * 1024 * 1024
|
gig = 1024.0 * 1024 * 1024
|
||||||
minfree = 10 * gig
|
minfree = 10 * gig
|
||||||
ignoreepisodetitle = False
|
ignoreepisodetitle = False
|
||||||
|
@ -44,10 +44,14 @@ arset = dict()
|
||||||
|
|
||||||
includes = dict()
|
includes = dict()
|
||||||
includes['Brooklyn Nine-Nine'] = 1
|
includes['Brooklyn Nine-Nine'] = 1
|
||||||
|
includes['Build It Bigger'] = 1
|
||||||
includes['Castle'] = 1
|
includes['Castle'] = 1
|
||||||
|
#includes['Conan'] = 1
|
||||||
includes['Family Guy'] = 1
|
includes['Family Guy'] = 1
|
||||||
includes['Hot in Cleveland'] = 1
|
includes['Hot in Cleveland'] = 1
|
||||||
includes["How It's Made"] = 1
|
includes["How It's Made"] = 1
|
||||||
|
includes["How Do They Do It?"] = 1
|
||||||
|
includes["How We Got to Now With Steven Johnson"] = 1
|
||||||
includes['Late Show With David Letterman'] = 1
|
includes['Late Show With David Letterman'] = 1
|
||||||
includes['Louie'] = 1
|
includes['Louie'] = 1
|
||||||
includes['Mad Men'] = 1
|
includes['Mad Men'] = 1
|
||||||
|
@ -57,18 +61,20 @@ includes['NCIS'] = 1
|
||||||
includes['NFL Football'] = 1
|
includes['NFL Football'] = 1
|
||||||
includes['Person of Interest'] = 1
|
includes['Person of Interest'] = 1
|
||||||
includes['Sesame Street'] = 1
|
includes['Sesame Street'] = 1
|
||||||
|
includes["Somebody's Gotta Do It With Mike Rowe"] = 1
|
||||||
includes['The Big Bang Theory'] = 1
|
includes['The Big Bang Theory'] = 1
|
||||||
includes['The Colbert Report'] = 1
|
includes['The Colbert Report'] = 1
|
||||||
includes['The Daily Show With Jon Stewart'] = 1
|
includes['The Daily Show With Jon Stewart'] = 1
|
||||||
includes['The Late Late Show With Craig Ferguson'] = 1
|
includes['The Late Late Show With Craig Ferguson'] = 1
|
||||||
includes['The Tonight Show Starring Jimmy Fallon'] = 1
|
#includes['The Tonight Show Starring Jimmy Fallon'] = 1
|
||||||
includes['The Wil Wheaton Project'] = 1
|
includes['The Wil Wheaton Project'] = 1
|
||||||
includes['Through the Wormhole With Morgan Freeman'] = 1
|
includes['Xtreme Waterparks'] = 1
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('tivomirror')
|
logger = logging.getLogger('tivomirror')
|
||||||
logger.setLevel(logging.INFO)
|
logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
|
|
||||||
class flushfile(object):
|
class flushfile(object):
|
||||||
def __init__(self, f):
|
def __init__(self, f):
|
||||||
self.f = f
|
self.f = f
|
||||||
|
@ -80,6 +86,7 @@ sys.stdout = flushfile(sys.stdout)
|
||||||
tmp = "/tmp"
|
tmp = "/tmp"
|
||||||
|
|
||||||
# prepare global requests sesssion to download the TOC and the episodes
|
# prepare global requests sesssion to download the TOC and the episodes
|
||||||
|
requests.packages.urllib3.disable_warnings()
|
||||||
session = requests.session()
|
session = requests.session()
|
||||||
session.verify = False
|
session.verify = False
|
||||||
session.auth = requests.auth.HTTPDigestAuth("tivo", mak)
|
session.auth = requests.auth.HTTPDigestAuth("tivo", mak)
|
||||||
|
@ -206,7 +213,7 @@ class TivoToc:
|
||||||
}
|
}
|
||||||
url = "https://{}/TiVoConnect".format(host)
|
url = "https://{}/TiVoConnect".format(host)
|
||||||
logger.debug(" offset %d" % (offset))
|
logger.debug(" offset %d" % (offset))
|
||||||
r = session.get(url, params=params, timeout=30)
|
r = session.get(url, params=params, timeout=30, verify=False)
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
return r.text
|
return r.text
|
||||||
|
@ -321,7 +328,7 @@ def download(item, mak, target):
|
||||||
#url = re.sub("tivo.lassitu.de:80", "krokodil-vpn.zs64.net:8888", url)
|
#url = re.sub("tivo.lassitu.de:80", "krokodil-vpn.zs64.net:8888", url)
|
||||||
logger.info("--- downloading \"%s\"" % (url))
|
logger.info("--- downloading \"%s\"" % (url))
|
||||||
start = time.time()
|
start = time.time()
|
||||||
r = session.get(url, stream=True)
|
r = session.get(url, stream=True, verify=False)
|
||||||
#r = session.get(url, stream=True, proxies={"http":"http://wavehh:8888","https":"http://wavehh:8888"})
|
#r = session.get(url, stream=True, proxies={"http":"http://wavehh:8888","https":"http://wavehh:8888"})
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
|
|
||||||
|
@ -496,7 +503,8 @@ def main():
|
||||||
curdir = os.getcwd()
|
curdir = os.getcwd()
|
||||||
os.chdir(os.path.expanduser("~") + "/.tivo")
|
os.chdir(os.path.expanduser("~") + "/.tivo")
|
||||||
handler = logging.handlers.RotatingFileHandler("tivomirror.log", maxBytes=2*1024*1024, backupCount=5)
|
handler = logging.handlers.RotatingFileHandler("tivomirror.log", maxBytes=2*1024*1024, backupCount=5)
|
||||||
handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)6.6s %(message)s'))
|
handler.setFormatter(logging.Formatter(fmt='tivomirror[%d] %%(asctime)s %%(levelname)6.6s %%(message)s' % (os.getpid()),
|
||||||
|
datefmt='%H:%M:%S'))
|
||||||
logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
downloaddb = anydbm.open("downloads.db", "c")
|
downloaddb = anydbm.open("downloads.db", "c")
|
||||||
toc = TivoToc()
|
toc = TivoToc()
|
||||||
|
|
Loading…
Reference in a new issue