mtime richtig setzen, Cookies ins Homeverzeichnis
This commit is contained in:
parent
67459fafd8
commit
a03a8c8cbe
1 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/local/bin/python
|
#!/usr/local/bin/python
|
||||||
|
|
||||||
# $Schlepperbande: src/tivomirror/tivomirror,v 1.43 2011/09/11 22:05:36 stb Exp $
|
# $Schlepperbande: src/tivomirror/tivomirror,v 1.44 2011/09/15 11:08:11 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.
|
||||||
|
@ -61,7 +61,8 @@ except OSError:
|
||||||
pass
|
pass
|
||||||
pwmgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
|
pwmgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
|
||||||
authhandler = urllib2.HTTPDigestAuthHandler(pwmgr)
|
authhandler = urllib2.HTTPDigestAuthHandler(pwmgr)
|
||||||
cookiejar = cookielib.MozillaCookieJar(os.getcwd() + "/tivo/.cookies.txt")
|
#cookiejar = cookielib.MozillaCookieJar(os.getcwd() + "/tivo/.cookies.txt")
|
||||||
|
cookiejar = cookielib.MozillaCookieJar(os.path.expanduser("~") + "/.tivocookies.txt")
|
||||||
opener = urllib2.build_opener(authhandler, urllib2.HTTPCookieProcessor(cookiejar))
|
opener = urllib2.build_opener(authhandler, urllib2.HTTPCookieProcessor(cookiejar))
|
||||||
urllib2.install_opener(opener)
|
urllib2.install_opener(opener)
|
||||||
tmp = "/tmp"
|
tmp = "/tmp"
|
||||||
|
@ -195,7 +196,7 @@ def download_decode(item, mak):
|
||||||
raise
|
raise
|
||||||
#tivomp4.transcode(target, mp4, item.ar)
|
#tivomp4.transcode(target, mp4, item.ar)
|
||||||
try:
|
try:
|
||||||
os.utime(target, [item.date, item.date])
|
os.utime(target, (item.date, item.date))
|
||||||
#os.utime(mp4, [item.date, item.date])
|
#os.utime(mp4, [item.date, item.date])
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "Urgh:", e
|
print "Urgh:", e
|
||||||
|
|
Loading…
Reference in a new issue