1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tivo Proxy Server

Discussion in 'Developers Corner' started by Allanon, Jul 22, 2012.

  1. Jan 15, 2013 #41 of 133
    vanclute

    vanclute Member

    157
    0
    Aug 3, 2003
    I did try the latest version, here's my result of pulling the RSS feed (get only a partial list) and clicking a link which tries to open in VLC:

    Code:
    192.168.2.16 - - [15/Jan/2013 12:48:56] "GET /rss HTTP/1.1" 200 -
    RSS Feed Send
    
    /download/I%27ll%20Be%20Seeing%20You.TiVo?Container=%2FNowPlaying&id=1334494
    
    Video URL:  http://192.168.2.10:80/download/I%27ll%20Be%20Seeing%20You.TiVo?Container=%2FNowPlaying&id=1334494
    
    192.168.2.16 - - [15/Jan/2013 12:49:07] "GET /download/I%27ll%20Be%20Seeing%20You.TiVo?Container=%2FNowPlaying&id=1334494 HTTP/1.1" 200 -
    
    Decoding video
    
    ----------------------------------------
    Exception happened during processing of request from ('192.168.2.16', 50824)
    Traceback (most recent call last):
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in __init__
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 343, in handle
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 331, in handle_one_request
      File "/Volumes/iMac Storage/Downloads/kmttg_MacOSX_tools_v0p8l/tivodecode/Tivo Proxy Server 4.py", line 162, in do_GET
        decode = subprocess.Popen(['tivodecode', '-m', Tivo_MAK, '--', '-'],shell=False,bufsize=0,stdin=subprocess.PIPE,stdout=subprocess.PIPE)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1228, in _execute_child
    OSError: [Errno 2] No such file or directory
    ----------------------------------------
    
    So still no joy. Ideas?
     
  2. Jan 15, 2013 #42 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    That error occurs when the program can't find tivodecode. Do you have tivodecode in the same folder and the program?
     
  3. Jan 15, 2013 #43 of 133
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    I am going to start over tonight with a complete reinstall. But I want to duplicate your setup.

    Can you tell me where you installed TivoProxy:

    C:\Program Files (x86)\TivoProxy\

    Where you installed Tivodecode:

    C:\Program Files (x86)\TivoProxy\tivodecode\

    Where you installed python:

    C:\Python27\
     
  4. Jan 15, 2013 #44 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    I have Python in the c:\Python27 folder and for easy access I placed the "Tivo Proxy Server.py" and tivodecode.exe files on my desktop, but you can place them in any folder you like. I also have a batch file that looks like this:

    Tivo Proxy Server.bat:
    Code:
    mode 150,10000
    c:\python27\python.exe "Tivo Proxy Server.py"
    pause
    
    This is optional, I use it because it makes debugging the program easier. The pause command keeps the command window open when an error occurs.
     
  5. Jan 15, 2013 #45 of 133
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    I will show you what I am getting:

    I placed Tivo Proxy Server.py and Tivodecode on the desktop in a directory called Tivoproxy. This time I extracted Tivodecode into the directory tivodecode-0.2pre4 under Tivoproxy. Last time I extracted it directly into the directory. Same outcome. I edited Tivo Proxy Server.py and updated the params thusly:

    Tivo_MAK = 'mymak'
    Server_URL = '192.168.1.6'
    Tivo_URL = '192.168.1.7'
    Port = 10000

    [​IMG]

    Right Click Tivo Proxy Server.py -> Open with -> Python and the console registers Serving at Port 10000
    [​IMG]

    Open the URL:
    Code:
    [B][url]http://192.168.1.6:10000/rss[/url][/B]
    in firefox and I get the RSS feed in xml form.
    [​IMG]
     

    Attached Files:

    • one.jpg
      one.jpg
      File size:
      19.2 KB
      Views:
      180
    • two.jpg
      two.jpg
      File size:
      15.5 KB
      Views:
      180
    • three.jpg
      three.jpg
      File size:
      53.4 KB
      Views:
      182
  6. Jan 15, 2013 #46 of 133
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    I then try to open a url in firefox formatted in this way:
    Code:
    [B]http://192.168.1.6:10000/download/Face%20Off.TiVo?Container=%2FNowPlaying&id=2338141[/B]
    [​IMG]


    And get a result in the python console showing the error:
    [​IMG]

    I get the exact same results running via VLN
     

    Attached Files:

  7. Jan 15, 2013 #47 of 133
    vanclute

    vanclute Member

    157
    0
    Aug 3, 2003
    Yep sure do, this server script is in the tivodecode directory.
     
  8. Jan 15, 2013 #48 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    Bradleys, try running the program as administrator. Also try coping the URL from the RSS feed and pasting it in to VLC. The video doesn't play in every video player. My Firefox browser shows a VLC logo instead of a Quicktime logo when playing the video in the browser.

    Vanclute, I'm unfamiliar with Mac's OS so I really don't know what is causing the problem. Maybe someone with Mac experience and Python knowledge can step in and help?
     
  9. Jan 15, 2013 #49 of 133
    vanclute

    vanclute Member

    157
    0
    Aug 3, 2003
    Yeah I feel like it's a python issue but I have almost no experience with it at all. I do PHP development so it doesn't look totally unfamiliar but it's different enough to have me stumped. I did install the latest python version but that doesn't seem to have helped.
     
  10. Jan 15, 2013 #50 of 133
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    OK, I created a batch file and ran it as administrator in VLN:

    Still does not work, but the error code looks a little different. Personally, I think it is having problems finding tivodecode...

    Code:
    C:\Windows\system32>c:\python27\python.exe "C:\Users\Scott\Desktop\TivoProxy\Tivo Proxy Server.py"
    serving at port 10000
    /rss
    HOME_OFFICE.home - - [15/Jan/2013 21:27:58] "GET /rss HTTP/1.1" 200 -
    RSS Feed Send
    
    /favicon.ico
    /download/The%20Big%20Bang%20Theory.TiVo?Container=%2FNowPlaying&id=2338150
    
    Video URL:  http://192.168.1.7:80/download/The%20Big%20Bang%20Theory.TiVo?Container=%2FNowPlaying&id=2338150
    
    HOME_OFFICE.home - - [15/Jan/2013 21:28:10] "GET /download/The%20Big%20Bang%20Theory.TiVo?Container=%2FNowPlaying&id=2338150 HTTP/1.1" 200 -
    
    Decoding video
    
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.6', 54014)
    Traceback (most recent call last):
      File "c:\python27\lib\SocketServer.py", line 284, in _handle_request_noblock
        self.process_request(request, client_address)
      File "c:\python27\lib\SocketServer.py", line 310, in process_request
        self.finish_request(request, client_address)
      File "c:\python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "c:\python27\lib\SocketServer.py", line 638, in __init__
        self.handle()
      File "c:\python27\lib\BaseHTTPServer.py", line 340, in handle
        self.handle_one_request()
      File "c:\python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
        method()
      File "C:\Users\Scott\Desktop\TivoProxy\Tivo Proxy Server.py", line 160, in do_GET
        decode = subprocess.Popen(['tivodecode', '-m', Tivo_MAK, '--', '-'],shell=False,bufsize=0,stdin=subprocess.PIPE,stdout=subprocess.PIPE)
      File "c:\python27\lib\subprocess.py", line 679, in __init__
        errread, errwrite)
      File "c:\python27\lib\subprocess.py", line 896, in _execute_child
        startupinfo)
    WindowsError: [Error 2] The system cannot find the file specified
    ----------------------------------------
    
     
  11. Jan 17, 2013 #51 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    Bradleys, give this a try. It is a version of the program that includes tivodecode. Just copy the folder on to your desktop and run Tivo Server Proxy.bat as admin. If this doesn't work then I have no idea why it's failing on your computer. I've run this exact build on Windows 7 and it worked.

    The tivodecode.exe included in this attachment is for Windows only.
     

    Attached Files:

  12. Jan 18, 2013 #52 of 133
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    I brought home my work laptop that is running Windows XP and did a fresh install on everything... This works perfectly.

    I also installed it on my media server and it works great in that environment as well... But, just does not work on my Windows 7 desktop. Weird....
     
  13. Jan 20, 2013 #53 of 133
    tatergator1

    tatergator1 Active Member

    1,523
    6
    Mar 27, 2008
    Columbus, Ohio
    I've also tried my hand at getting this setup. I've had partial success. It seems to be choking on something in my XML file. I've got TivoServer.py running fine and I am using the "podcast" method in VLC to serve the files. Using this method, it pulls in only the most recent 6 programs recorded. When I then attempt to play any of those files, it is unable to serve the first 5, which is probably a result of Time Warner's "copy once" CCI byte. The 6th program is from a local channel and is not affected by the CCI byte.

    I know I'm probably out of luck regarding that, but the real question is what is causing the XML to cut-out after the first 6 most recent shows.

    Code:
    serving at port 8000
    /rss
    Desktop - - [20/Jan/2013 22:24:58] "GET /rss HTTP/1.1" 200 -
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.6', 59854)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
        self.process_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 310, in process_request
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Python27\lib\SocketServer.py", line 639, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 331, in handle_one_request
        method()
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 130, in
    do_GET
        writeRSS(self.wfile)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 96, in w
    riteRSS
        p.feed(XML.read(), wfile)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 42, in f
    eed
        self._parser.Parse(data, 0)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 64, in e
    nd
        self.wfile.write('\t\t<' + tag + '>' + self.data + '</' + tag + '>\n')
      File "C:\Python27\lib\socket.py", line 316, in write
        data = str(data) # XXX Should really reject non-string non-buffers
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 33:
     ordinal not in range(128)
    ----------------------------------------
    
    When I try to play the 6 videos, I get:

    Code:
    ----------------------------------------
    /download/Max%20%26%20Ruby.TiVo?Container=%2FNowPlaying&id=232446
    
    Video URL:  [url]http://192.168.1.100:80/download/Max%20%26%20Ruby.TiVo?Container=%2FNowPlaying&id=232446[/url]
    
    
    Desktop - - [20/Jan/2013 22:28:20] "GET /download/Max%20%26%20Ruby.TiVo?Container=%2FNowPlaying&id=2
    32446 HTTP/1.1" 200 -
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.6', 59866)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
        self.process_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 310, in process_request
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Python27\lib\SocketServer.py", line 639, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 331, in handle_one_request
        method()
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 153, in do_GET
        videoFile =  openUrl(link, 'tivo', Tivo_MAK)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 24, in openUrl
        return urllib2.urlopen(url)
      File "C:\Python27\lib\urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 432, in error
        result = self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 1072, in http_error_401
        host, req, headers)
      File "C:\Python27\lib\urllib2.py", line 957, in http_error_auth_reqed
        return self.retry_http_digest_auth(req, authreq)
      File "C:\Python27\lib\urllib2.py", line 968, in retry_http_digest_auth
        resp = self.parent.open(req, timeout=req.timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 438, in error
        return self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 521, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    HTTPError: HTTP Error 403: Forbidden
    ----------------------------------------
    /download/Mickey%20Mouse%20Clubhouse.TiVo?Container=%2FNowPlaying&id=232443
    
    Video URL:  [url]http://192.168.1.100:80/download/Mickey%20Mouse%20Clubhouse.TiVo?Container=%2FNowPlaying[/url]
    &id=232443
    
    Desktop - - [20/Jan/2013 22:28:20] "GET /download/Mickey%20Mouse%20Clubhouse.TiVo?Container=%2FNowPl
    aying&id=232443 HTTP/1.1" 200 -
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.6', 59871)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
        self.process_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 310, in process_request
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Python27\lib\SocketServer.py", line 639, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 331, in handle_one_request
        method()
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 153, in do_GET
        videoFile =  openUrl(link, 'tivo', Tivo_MAK)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 24, in openUrl
        return urllib2.urlopen(url)
      File "C:\Python27\lib\urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 432, in error
        result = self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 1072, in http_error_401
        host, req, headers)
      File "C:\Python27\lib\urllib2.py", line 957, in http_error_auth_reqed
        return self.retry_http_digest_auth(req, authreq)
      File "C:\Python27\lib\urllib2.py", line 968, in retry_http_digest_auth
        resp = self.parent.open(req, timeout=req.timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 438, in error
        return self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 521, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    HTTPError: HTTP Error 403: Forbidden
    ----------------------------------------
    /download/Blue's%20Clues.TiVo?Container=%2FNowPlaying&id=232448
    
    Video URL:  [url]http://192.168.1.100:80/download/Blue's%20Clues.TiVo?Container=%2FNowPlaying&id=232448[/url]
    
    Desktop - - [20/Jan/2013 22:28:21] "GET /download/Blue's%20Clues.TiVo?Container=%2FNowPlaying&id=232
    448 HTTP/1.1" 200 -
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.6', 59876)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
        self.process_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 310, in process_request
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Python27\lib\SocketServer.py", line 639, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 331, in handle_one_request
        method()
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 153, in do_GET
        videoFile =  openUrl(link, 'tivo', Tivo_MAK)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 24, in openUrl
        return urllib2.urlopen(url)
      File "C:\Python27\lib\urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 432, in error
        result = self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 1072, in http_error_401
        host, req, headers)
      File "C:\Python27\lib\urllib2.py", line 957, in http_error_auth_reqed
        return self.retry_http_digest_auth(req, authreq)
      File "C:\Python27\lib\urllib2.py", line 968, in retry_http_digest_auth
        resp = self.parent.open(req, timeout=req.timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 438, in error
        return self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 521, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    HTTPError: HTTP Error 403: Forbidden
    ----------------------------------------
    /download/Hercules.TiVo?Container=%2FNowPlaying&id=234088
    
    Video URL:  [url]http://192.168.1.100:80/download/Hercules.TiVo?Container=%2FNowPlaying&id=234088[/url]
    
    Desktop - - [20/Jan/2013 22:28:21] "GET /download/Hercules.TiVo?Container=%2FNowPlaying&id=234088 HT
    TP/1.1" 200 -
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.6', 59881)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
        self.process_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 310, in process_request
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Python27\lib\SocketServer.py", line 639, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 331, in handle_one_request
        method()
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 153, in do_GET
        videoFile =  openUrl(link, 'tivo', Tivo_MAK)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 24, in openUrl
        return urllib2.urlopen(url)
      File "C:\Python27\lib\urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 432, in error
        result = self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 1072, in http_error_401
        host, req, headers)
      File "C:\Python27\lib\urllib2.py", line 957, in http_error_auth_reqed
        return self.retry_http_digest_auth(req, authreq)
      File "C:\Python27\lib\urllib2.py", line 968, in retry_http_digest_auth
        resp = self.parent.open(req, timeout=req.timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 438, in error
        return self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 521, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    HTTPError: HTTP Error 403: Forbidden
    ----------------------------------------
    /download/Mickey%20Mouse%20Clubhouse.TiVo?Container=%2FNowPlaying&id=232231
    
    Video URL:  [url]http://192.168.1.100:80/download/Mickey%20Mouse%20Clubhouse.TiVo?Container=%2FNowPlaying[/url]
    &id=232231
    
    Desktop - - [20/Jan/2013 22:28:22] "GET /download/Mickey%20Mouse%20Clubhouse.TiVo?Container=%2FNowPl
    aying&id=232231 HTTP/1.1" 200 -
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.6', 59886)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
        self.process_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 310, in process_request
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Python27\lib\SocketServer.py", line 639, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 331, in handle_one_request
        method()
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 153, in do_GET
        videoFile =  openUrl(link, 'tivo', Tivo_MAK)
      File "C:\Users\Andrew\Desktop\Tivo Server\Tivo Proxy Server.py", line 24, in openUrl
        return urllib2.urlopen(url)
      File "C:\Python27\lib\urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 432, in error
        result = self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 1072, in http_error_401
        host, req, headers)
      File "C:\Python27\lib\urllib2.py", line 957, in http_error_auth_reqed
        return self.retry_http_digest_auth(req, authreq)
      File "C:\Python27\lib\urllib2.py", line 968, in retry_http_digest_auth
        resp = self.parent.open(req, timeout=req.timeout)
      File "C:\Python27\lib\urllib2.py", line 400, in open
        response = meth(req, response)
      File "C:\Python27\lib\urllib2.py", line 513, in http_response
        'http', request, response, code, msg, hdrs)
      File "C:\Python27\lib\urllib2.py", line 438, in error
        return self._call_chain(*args)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 521, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    HTTPError: HTTP Error 403: Forbidden
    ----------------------------------------
    /download/CBS%20Evening%20News%20With%20Scott%20Pelley.TiVo?Container=%2FNowPlaying&id=232019
    
    Video URL:  [url]http://192.168.1.100:80/download/CBS%20Evening%20News%20With%20Scott%20Pelley.TiVo?Container=%2FNowPlaying&id=232019[/url]
    
    
    Desktop - - [20/Jan/2013 22:28:22] "GET /download/CBS%20Evening%20News%20With%20Scott%20Pelley.TiVo?Container=%2FNowPlaying&id=232019 HTTP/1.1" 200 -
    
    Decoding video
    
    Encryption by QUALCOMM ;)
    
    
    I'd appreciate any effort you might make to see what's going on. Also, If i try to load the RSS via Firefox, I get the following:

    Here's the accompanying XML file:



    Thanks,
     

    Attached Files:

  14. Jan 21, 2013 #54 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    Tatergator1, the Tivo XML file had an episode title with unicode (Daisy, la QuinceaƱera). I fixed the program so it replaces the unicode with the equivalent ascii character. If there isn't one then a ? is put in place of the character.

    Also, try running the program as administrator to get rid of the forbidden error.

    Attached is the updated code:
     

    Attached Files:

  15. Jan 21, 2013 #55 of 133
    tatergator1

    tatergator1 Active Member

    1,523
    6
    Mar 27, 2008
    Columbus, Ohio
    Thanks so much for the update. I really appreciate you taking the time to review my situation. My RSS feed has increased to 16 times and no errors are listed anywhere.

    The question is, why isn't it parsing all 90+ items that I can see in my XML file?

    As for the Forbidden 403's, I'm very confident those are related to the copy protection blocking transfers of those programs. I am currently running as admin, so that shouldn't be a problem. For example, with the larger RSS feed, I can play 3 of the 16 items, with the 3 items I can play being on CBS and PBS, which Time Warner Cable can't legally copy-protect.

    Any thoughts on why I only get 16 of my 90+ items?
     
  16. Jan 21, 2013 #56 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    Is this a different XML file than the one posted? The one posted only had 16 items.
     
  17. Jan 21, 2013 #57 of 133
    tatergator1

    tatergator1 Active Member

    1,523
    6
    Mar 27, 2008
    Columbus, Ohio
    My mistake. There are only 16 items in the XML generated yesterday evening, What was throwing me off was the <Total Items> line that shows 98. I just reloaded the XML file off the Tivo Premiere and it's still only showing the most recent 16 Items, while <total items> is now 99.

    Now the question is why is the Tivo generated XML file incomplete?

    Update: I just loaded the XML off my old Series 2 DT for the first time as a test and the generated XML shows <total items> 58 and <item count> 58. Everything looks good from the Series 2. Now, why is the Premiere XML incomplete?

    Another update:

    Found this discussion here.

    Looks like Premiere's have deliberately truncated XML's. I can get up to 50 items in the XML by adding &ItemCount=50 to the URL. I would then need to run another XML grab by using AnchorOffset=51&ItemCount=50. Makes things a bit more complicated.
     
  18. Jan 22, 2013 #58 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    Tatergator1, I will update the program to account for this. Guess I better start recording some shows so I can test. :)
     
  19. Jan 22, 2013 #59 of 133
    Allanon

    Allanon Member

    581
    0
    Nov 2, 2005
    Attached is an updated version of the code. This version will list all videos in the RSS feed, not just the first 16.

    Tatergator1, thanks for discovering the bug and providing a link to a way to solve the problem. It made fixing the problem very easy.
     

    Attached Files:

  20. Jan 22, 2013 #60 of 133
    tatergator1

    tatergator1 Active Member

    1,523
    6
    Mar 27, 2008
    Columbus, Ohio
    That did it! Thanks for taking the time to address my problems. This should be a good way to let my wife watch some of her shows in the Office/Craft Room without having to spend the 10+ minutes to download the whole .tivo file. This is a nice way to MRV without the Tivo. You give up trick-play capabilities, but you get near-instant playback straight from the host Tivo.

    This will be a nice solution until Tivo finally releases more details and pricing on the Mini!
     

Share This Page