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

TiVo ToDo list from website

Discussion in 'TiVo Home Media Features & TiVoToGo' started by orangeboy, Sep 17, 2010.

  1. Sep 17, 2010 #1 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Since initially writing this post, I've made progress with some of the ideas I had in mind regarding the information available from the TiVo website. I've made my project publicly available using Google Code:

    • Project Home - Offers a brief overview of the project, and links to available downloads and wiki pages.
    • Download section - Here you can find stable releases of the application.
    • Wiki section - Here you can find more in-depth information:
      • Getting Started - How to install the application.
      • TiVoToDo Conf File - An explanation of the required and optional configuration settings.
      • What It Does - Gives a high level view of the steps the application takes to get the information.
      • And The Results - Gives an example of the csv files that can be created and viewed in a spreadsheet application (Excel, OpenOffice, etc...)
      • Nuts and Bolts - Insight into some of the variables I created, and the values they represent. This page is geared more for developers and contributers.
    • Issues section - Here's where to report problems, or submit Enhancement Requests.
    • Source section - Here you can access beta level versions of the program:
      • Checkout - Provides the subversion command to download the latest revision committed.
      • Browse - Here you can review/preview source code committed to the project (so far, everything is found in /trunk)
      • Changes - Here you can find a change history for the components of the project. Clicking on one of the changes opens a new page that offers a "diff" link. This will show what changes were made between the current revision and the previous revision.

    This project is written in the 2.x version of the python language. Trying to run it using 3.x will result in failure.
     
  2. Sep 20, 2010 #2 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    OK, after much trial and error and looking more closely at the tivo.com source html, the following will get the html page that contains the first 20 entries of the ToDo list for the DVR specified by "tsn":

    Code:
    #!/usr/bin/python
    #TiVoToDo.py
    
    import sys
    import os.path
    import urllib
    import urllib2
    import cookielib
    
    email = sys.argv[1]
    password = sys.argv[2]
    tsn = sys.argv[3]
    urlopen = urllib2.urlopen
    Request = urllib2.Request
    
    cookiefile = 'cookies.lwp'
    
    cj = cookielib.LWPCookieJar()
    
    if os.path.isfile(cookiefile):
        cj.load(cookiefile)
    
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
    urllib2.install_opener(opener)
    
    url = 'https://www3.tivo.com/tivo-tco/login.do'
    data = urllib.urlencode({
        'cams_cb_partner': None,
        'cams_security_domain': 'tivocom',
        'cams_login_config': 'http',
        'cams_original_url': '/tivo-tco/go.do?def=tco.todo.page&tsn=' + tsn,
        'cams_cb_username': email,
        'cams_cb_password': password,
        'remember_email': 'true',
        'cams_cb_rememberme': 'true'
    })
    
    header =  {
        'User-agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
    }
    
    try:
        req = Request(url, data, header)
        handle = urlopen(req)
    except IOError, e:
        print 'We failed to open "%s".' % url
        if hasattr(e, 'code'):
            print 'We failed with error code - %s.' % e.code
    else:
        print handle.read()
    cj.save(cookiefile)
    
    At this time, it's still parsing command line arguments. Adding in a Config Parser should make less command line arguments.

    To invoke:
    Code:
    TiVoToDo.py "username" "password" "6480001########"
    It's not very pretty so far, and only the ability to get to the page has been accomplished.
     
  3. Sep 20, 2010 #3 of 182
    moyekj

    moyekj Well-Known Member

    11,134
    27
    Jan 23, 2006
    Mission...
    Pretty cool, well done. Have you tracked how up to date the ToDo list is on tivo.com? Is it updated with daily net connect only or is it updated with each VCM connection? I remember the Now Playing List was not very up to date and missed things such as MRV transfers.
     
  4. Sep 20, 2010 #4 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Thank you!
    So far, my Series3 and Premiere are pretty much current on the site, so my guess would be the VCM connection. A better test would be my Series2 which has 48 manual (30 minute) recordings to support my security camera, but that ToDo list doesn't show up at all on the site! I'm wondering if that many entries (48 entries per day x ~12 days of guide data = 576 entries in the worst case) is too much for the ToDo app at tivo.com. I'll keep my eye out for discrepancies, should any become evident!
     
  5. Sep 20, 2010 #5 of 182
    gonzotek

    gonzotek tivo_xml developer

    2,401
    3
    Sep 24, 2004
    Outside...
    I'm pretty sure the S2 tivos don't have support for the website NPL and ToDo lists.
     
  6. Sep 20, 2010 #6 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Yep, confirmed:
     
  7. Sep 20, 2010 #7 of 182
    tomm1079

    tomm1079 New Member

    567
    0
    May 10, 2005
    wow very nice....putting this together with that advanced now playing list could give some good in via a web browser...
     
  8. Sep 22, 2010 #8 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    I got a bit further. I gather DVR names and their TSNs from '/tivo-tco/go.do?def=tco.nowplaying.page', and stealing some code from WMcBrine, check to see if they are HD capable. I loop only through those DVRs that are HD, and gather the ToDo Lists from the tivo site into a single list. Right now, all I'm doing is presenting the data at a command prompt, using a "print" command. I also went ahead and used a little config file to store the TiVo email address and password. There's very little error checking, it's not documented, and I don't know how closely it follows PEP 8 standards. This is my first real stab at using python, so my conventions may not match what you'd find in the rest of the world. :rolleyes:

    TiVoToDo.py:
    Code:
    #!/usr/bin/python
    #TiVoToDo.py
    
    import sys
    import os.path
    import urllib
    import urllib2
    import cookielib
    import ConfigParser
    
    from HTMLParser import HTMLParser
    from collections import defaultdict
    
    p = os.path.dirname(__file__)
    config = ConfigParser.ConfigParser()
    config_files = ['/etc/TiVoToDo.conf', os.path.join(p, 'TiVoToDo.conf')]
    configs_found = config.read(config_files)
    
    if not configs_found:
        print ('ERROR: TiVoToDo.conf does not exist.\n' +
               'You must create this file before running TiVoToDo.')
        sys.exit(1)
    config.read(config_files)
    
    if not config.has_section('email'):
        print 'TiVo account email required in TiVoToDo.conf'
        sys.exit(1)
    email = config.get('email', 'email')
        
    if not config.has_section('password'):
        print 'TiVo account password required in TiVoToDo.conf'
        sys.exit(1)
    password = config.get('password', 'password')
        
    tdl = []
    header = {'User-agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}
    base_url = 'https://www3.tivo.com'
    todo_url = '/tivo-tco/go.do?def=tco.todo.page'
    npl_url = '/tivo-tco/go.do?def=tco.nowplaying.page'
    
    cookiefile = 'cookies.lwp'
    urlopen = urllib2.urlopen
    Request = urllib2.Request
    cj      = cookielib.LWPCookieJar()
    
    if os.path.isfile(cookiefile):
        cj.load(cookiefile)
    
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
    urllib2.install_opener(opener)
        
    class TagParser(HTMLParser):
        tdl = []
        tsns = []
        tivos = []
        current_tivo = None
        noShows = False
        def __init__(self):
            HTMLParser.__init__(self)
            self.a_flag = False
            self.a_data = ''
            self.get_data = False
            self.option_flag = False
            self.select_flag = False
            self.span_count = 0
            self.span_flag = False
            self.span_tags = ['day', 'date', 'time']
        
        def handle_starttag(self, tag, attrs):
            if tag == 'a' and page != 'NPL' and attrs != []:
                if attrs[0][1] == 'trigger':
                    self.a_flag = True
                    self.get_data = True
    
            if tag == 'div' and page != 'NPL' and attrs != []:
                if attrs[0][1] == 'noShows':
                    TagParser.noShows = True
            
            if tag == 'option' and self.select_flag and \
               attrs[0][0] =='value' and page == 'NPL':
                self.option_flag = True
                self.get_data = True
                TagParser.tsns.append(attrs[0][1])
            
            if tag == 'select' and attrs[0][1] == 'DVRlist':
                self.select_flag = True
            
            if tag == 'span' and attrs[0][1] in self.span_tags and page != 'NPL':
                self.span_flag = True
                self.get_data = True
                self.span_count += 1
                
        def handle_data(self, data):
            if self.get_data:
                if self.span_flag:
                    TagParser.tdl.append(data)
            
                if self.a_flag:
                    self.a_data = self.a_data + data
                    
                if self.option_flag:
                    TagParser.tivos.append(data)
     
        def handle_endtag(self, tag):
            if tag == 'a' and self.a_flag:
                TagParser.tdl.append(self.a_data.rstrip('\n '))
                TagParser.tdl.append(TagParser.current_tivo)
                self.a_data = ''
                self.a_flag = False
            self.get_data = False
            self.span_flag = False
            self.option_flag = False
            if tag == 'select':
                self.select_flag = False
    
    parser  = TagParser()
            
    def login(email, password):
        url = base_url + '/tivo-tco/login.do'
        login_data = urllib.urlencode({
            'cams_cb_partner': None,
            'cams_security_domain': 'tivocom',
            'cams_login_config': 'http',
            'cams_original_url': npl_url,
            'cams_cb_username': email,
            'cams_cb_password': password,
            'remember_email': 'true',
            'cams_cb_rememberme': 'true'
        })
        return url, login_data
    
    def request_url(url, data=None, header=header):
        if data is None:
            data = None
        try:
            req = Request(url, data, header)
            handle = urlopen(req)
        except IOError, e:
            print 'We failed to open "%s".' % url
            if hasattr(e, 'code'):
                print 'We failed with error code - %s.' % e.code
        else:
            result = handle.read()
            parser.feed(result)
            parser.close()
            parser.reset()
        
    def isHDtivo(tsn):  # tsn's of High Definition Tivo's
        return bool(tsn and tsn[0] >= '6' and tsn[:3] != '649')
    
    page = 'NPL'
    url, login_data = login(email, password)
    request_url(url, login_data, header)
    
    tivos = dict(zip(parser.tivos, parser.tsns))
    
    for tivo, tsn in tivos.iteritems():
        TagParser.noShows = False
        if isHDtivo(tsn):
            TagParser.current_tivo = tivo
            page = 'ToDo'
            offset = 0
    
            while not TagParser.noShows:
                url = base_url + todo_url + '&tsn=' + tsn + '&offset=%d' % offset
                offset += 20
                login_data = None
                request_url(url, login_data, header)
    
    raw_tdl = parser.tdl
    
    for i in range(5, len(raw_tdl), 5):
        nl = raw_tdl[i-5:i]
        a = nl[1].partition('/')
        a = a[0].rjust(2,'0') + a[1] + a[2].rjust(2,'0')
        tdl.append([a, nl[0], nl[2].rjust(8), nl[4].center(8), nl[3].ljust(25)])
    
    tdl.sort()
    for i in range(len(tdl)):
        print tdl[i]
    
    print
    x = raw_input("Press Enter")
    exit ()
    
    Before use, the .conf file needs updated, then stored at the same location as the .py file.

    TiVoToDo.conf:
    Code:
    [email]
    email = 
    
    [password]
    password = 
    
    My results:
    Code:
     9:49:18>tivotodo.py
    ['09/23', 'Thu', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['09/23', 'Thu', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/23', 'Thu', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/23', 'Thu', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/23', 'Thu', ' 8:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/23', 'Thu', ' 8:00 pm', '     TivoS3     ', '     Nova scienceNOW     ']
    ['09/23', 'Thu', ' 8:00 pm', '     TivoS4     ', '        Community        ']
    ['09/23', 'Thu', ' 8:00 pm', '    DVR 1FA0    ', '   The Big Bang Theory   ']
    ['09/23', 'Thu', ' 8:30 pm', '     TivoS4     ', '         30 Rock         ']
    ['09/23', 'Thu', ' 9:00 pm', '     TivoS3     ', '           NOVA          ']
    ['09/23', 'Thu', ' 9:00 pm', '     TivoS3     ', 'CSI: Crime Scene Inve ...']
    ['09/23', 'Thu', ' 9:00 pm', '     TivoS4     ', '          Nikita         ']
    ['09/23', 'Thu', ' 9:00 pm', '     TivoS4     ', '        The Office       ']
    ['09/23', 'Thu', ' 9:00 pm', '    DVR 1FA0    ', 'The Real Housewives o ...']
    ['09/23', 'Thu', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/23', 'Thu', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/23', 'Thu', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/23', 'Thu', '11:00 pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/23', 'Thu', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/24', 'Fri', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['09/24', 'Fri', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['09/24', 'Fri', ' 5:30 pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/24', 'Fri', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['09/24', 'Fri', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/24', 'Fri', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/24', 'Fri', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/24', 'Fri', ' 8:00 pm', '     TivoS4     ', '        Smallville       ']
    ['09/24', 'Fri', ' 8:00 pm', '     TivoS4     ', '       Dateline NBC      ']
    ['09/24', 'Fri', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/24', 'Fri', '10:00 pm', '     TivoS4     ', '          20/20          ']
    ['09/24', 'Fri', '10:00 pm', '     TivoS4     ', '          Outlaw         ']
    ['09/24', 'Fri', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/24', 'Fri', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/24', 'Fri', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/24', 'Fri', '11:00 pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/24', 'Fri', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/25', 'Sat', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['09/25', 'Sat', ' 1:01 am', '    DVR 1FA0    ', '        Rescue Me        ']
    ['09/25', 'Sat', ' 1:30 pm', '     TivoS3     ', "    Woodwright's Shop    "]
    ['09/25', 'Sat', ' 3:00 pm', '     TivoS3     ', '   New Yankee Workshop   ']
    ['09/25', 'Sat', ' 3:00 pm', '     TivoS4     ', '         Rawhide         ']
    ['09/25', 'Sat', ' 4:00 pm', '     TivoS4     ', '         Rawhide         ']
    ['09/25', 'Sat', ' 5:00 pm', '     TivoS3     ', '    Ask This Old House   ']
    ['09/25', 'Sat', ' 5:30 pm', '     TivoS3     ', '      This Old House     ']
    ['09/25', 'Sat', ' 6:00 pm', '     TivoS3     ', '         Hometime        ']
    ['09/25', 'Sat', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/25', 'Sat', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/25', 'Sat', ' 8:00 pm', '     TivoS4     ', '           Cops          ']
    ['09/25', 'Sat', '10:00 pm', '     TivoS3     ', '     48 Hours Mystery    ']
    ['09/25', 'Sat', '10:00 pm', '     TivoS4     ', 'Law & Order: Special  ...']
    ['09/26', 'Sun', ' 2:05 am', '     TivoS4     ', '   Legend of the Seeker  ']
    ['09/26', 'Sun', ' 4:00 am', '     TivoS3     ', '    Austin City Limits   ']
    ['09/26', 'Sun', ' 6:30 pm', '     TivoS4     ', '       The Simpsons      ']
    ['09/26', 'Sun', ' 7:30 pm', '     TivoS4     ', '        60 Minutes       ']
    ['09/26', 'Sun', ' 8:00 pm', '     TivoS4     ', '       The Simpsons      ']
    ['09/26', 'Sun', ' 8:30 pm', '     TivoS4     ', '    The Cleveland Show   ']
    ['09/26', 'Sun', ' 9:00 pm', '     TivoS4     ', '        Family Guy       ']
    ['09/26', 'Sun', '10:00 pm', '    DVR 1FA0    ', '         The Unit        ']
    ['09/26', 'Sun', '10:00 pm', '    DVR 1FA0    ', 'Keeping Up With the K ...']
    ['09/26', 'Sun', '10:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/26', 'Sun', '10:30 pm', '     TivoS3     ', '    The Red Green Show   ']
    ['09/26', 'Sun', '11:00 am', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/26', 'Sun', '11:00 am', '     TivoS3     ', '     McLaughlin Group    ']
    ['09/26', 'Sun', '11:00 pm', '     TivoS3     ', '         The Unit        ']
    ['09/26', 'Sun', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/26', 'Sun', '11:00 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/26', 'Sun', '11:00 pm', '    DVR 1FA0    ', '         The Unit        ']
    ['09/26', 'Sun', '11:30 pm', '    DVR 1FA0    ', '        The Reader       ']
    ['09/27', 'Mon', ' 1:35 am', '     TivoS4     ', '   Legend of the Seeker  ']
    ['09/27', 'Mon', ' 2:00 am', '     TivoS3     ', '    Austin City Limits   ']
    ['09/27', 'Mon', ' 2:05 am', '     TivoS4     ', '       Dateline NBC      ']
    ['09/27', 'Mon', ' 3:00 pm', '    DVR 1FA0    ', '    Muscle Car Workout   ']
    ['09/27', 'Mon', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['09/27', 'Mon', ' 5:30 pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/27', 'Mon', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['09/27', 'Mon', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/27', 'Mon', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/27', 'Mon', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/27', 'Mon', ' 8:00 pm', '    DVR 1FA0    ', '          Chuck          ']
    ['09/27', 'Mon', ' 9:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/27', 'Mon', ' 9:00 pm', '     TivoS4     ', '        The Event        ']
    ['09/27', 'Mon', ' 9:00 pm', '    DVR 1FA0    ', '        The Event        ']
    ['09/27', 'Mon', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/27', 'Mon', '10:00 pm', '     TivoS3     ', '    Ask This Old House   ']
    ['09/27', 'Mon', '10:00 pm', '     TivoS4     ', '          Chase          ']
    ['09/27', 'Mon', '10:30 pm', '     TivoS3     ', '         Hometime        ']
    ['09/27', 'Mon', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/27', 'Mon', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/27', 'Mon', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/27', 'Mon', '11:00 pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/27', 'Mon', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/27', 'Mon', '12:00 am', '     TivoS4     ', '  Alfred Hitchcock Hour  ']
    ['09/28', 'Tue', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['09/28', 'Tue', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['09/28', 'Tue', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['09/28', 'Tue', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/28', 'Tue', ' 8:00 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/28', 'Tue', ' 9:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/28', 'Tue', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/28', 'Tue', '10:00 pm', '     TivoS3     ', '      This Old House     ']
    ['09/28', 'Tue', '10:30 pm', '     TivoS3     ', '   New Yankee Workshop   ']
    ['09/28', 'Tue', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/28', 'Tue', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/28', 'Tue', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/28', 'Tue', '11:00 pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/28', 'Tue', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/28', 'Tue', '12:00 am', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['09/29', 'Wed', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['09/29', 'Wed', ' 5:30 pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/29', 'Wed', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['09/29', 'Wed', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/29', 'Wed', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/29', 'Wed', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/29', 'Wed', ' 8:00 pm', '     TivoS3     ', "      Hell's Kitchen     "]
    ['09/29', 'Wed', ' 8:00 pm', '     TivoS4     ', '        The Middle       ']
    ['09/29', 'Wed', ' 9:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', ' 9:00 pm', '     TivoS4     ', 'Law & Order: Special  ...']
    ['09/29', 'Wed', ' 9:00 pm', '    DVR 1FA0    ', '         The Unit        ']
    ['09/29', 'Wed', ' 9:31 pm', '     TivoS4     ', '       Cougar Town       ']
    ['09/29', 'Wed', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', '10:00 pm', '     TivoS3     ', '     The Whole Truth     ']
    ['09/29', 'Wed', '10:00 pm', '     TivoS4     ', '     The Whole Truth     ']
    ['09/29', 'Wed', '10:00 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/29', 'Wed', '10:00 pm', '    DVR 1FA0    ', '      The Defenders      ']
    ['09/29', 'Wed', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/29', 'Wed', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/29', 'Wed', '11:00 pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/29', 'Wed', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/29', 'Wed', '12:00 am', '     TivoS3     ', '      Criminal Minds     ']
    ['09/30', 'Thu', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['09/30', 'Thu', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['09/30', 'Thu', ' 5:30 pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/30', 'Thu', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['09/30', 'Thu', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/30', 'Thu', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/30', 'Thu', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/30', 'Thu', ' 8:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/30', 'Thu', ' 8:00 pm', '     TivoS3     ', '     Nova scienceNOW     ']
    ['09/30', 'Thu', ' 8:00 pm', '     TivoS4     ', '        Community        ']
    ['09/30', 'Thu', ' 8:00 pm', '    DVR 1FA0    ', '   The Big Bang Theory   ']
    ['09/30', 'Thu', ' 8:30 pm', '     TivoS4     ', '         30 Rock         ']
    ['09/30', 'Thu', ' 9:00 pm', '     TivoS3     ', '           NOVA          ']
    ['09/30', 'Thu', ' 9:00 pm', '     TivoS3     ', 'CSI: Crime Scene Inve ...']
    ['09/30', 'Thu', ' 9:00 pm', '     TivoS4     ', '          Nikita         ']
    ['09/30', 'Thu', ' 9:00 pm', '     TivoS4     ', '        The Office       ']
    ['09/30', 'Thu', ' 9:00 pm', '    DVR 1FA0    ', 'The Real Housewives o ...']
    ['09/30', 'Thu', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/30', 'Thu', '10:30 am', '     TivoS4     ', "Art Wolfe's Travels t ..."]
    ['09/30', 'Thu', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/30', 'Thu', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/30', 'Thu', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/30', 'Thu', '11:00 pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/30', 'Thu', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/01', 'Fri', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['10/01', 'Fri', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['10/01', 'Fri', ' 5:30 pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['10/01', 'Fri', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['10/01', 'Fri', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/01', 'Fri', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/01', 'Fri', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/01', 'Fri', ' 8:00 pm', '     TivoS4     ', '        Smallville       ']
    ['10/01', 'Fri', ' 8:00 pm', '     TivoS4     ', '       Dateline NBC      ']
    ['10/01', 'Fri', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/01', 'Fri', '10:00 pm', '     TivoS4     ', '          20/20          ']
    ['10/01', 'Fri', '10:00 pm', '     TivoS4     ', '          Outlaw         ']
    ['10/01', 'Fri', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/01', 'Fri', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/01', 'Fri', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/01', 'Fri', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/02', 'Sat', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['10/02', 'Sat', ' 1:00 am', '    DVR 1FA0    ', '        Rescue Me        ']
    ['10/02', 'Sat', ' 1:30 pm', '     TivoS3     ', "    Woodwright's Shop    "]
    ['10/02', 'Sat', ' 3:00 pm', '     TivoS3     ', '   New Yankee Workshop   ']
    ['10/02', 'Sat', ' 3:00 pm', '     TivoS4     ', '         Rawhide         ']
    ['10/02', 'Sat', ' 4:00 pm', '     TivoS4     ', '         Rawhide         ']
    ['10/02', 'Sat', ' 5:00 pm', '     TivoS3     ', '    Ask This Old House   ']
    ['10/02', 'Sat', ' 6:00 pm', '     TivoS3     ', '         Hometime        ']
    ['10/02', 'Sat', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/02', 'Sat', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/02', 'Sat', ' 8:00 pm', '     TivoS4     ', '           Cops          ']
    ['10/02', 'Sat', '10:00 pm', '     TivoS4     ', 'Law & Order: Special  ...']
    ['10/02', 'Sat', '12:00 am', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['10/03', 'Sun', ' 2:05 am', '     TivoS4     ', '   Legend of the Seeker  ']
    ['10/03', 'Sun', ' 7:00 pm', '     TivoS4     ', '        60 Minutes       ']
    ['10/03', 'Sun', ' 8:00 pm', '     TivoS4     ', '       The Simpsons      ']
    ['10/03', 'Sun', ' 8:30 pm', '     TivoS4     ', '    The Cleveland Show   ']
    ['10/03', 'Sun', ' 9:00 pm', '     TivoS4     ', '        Family Guy       ']
    ['10/03', 'Sun', ' 9:30 pm', '     TivoS4     ', '       American Dad      ']
    ['10/03', 'Sun', '10:00 pm', '    DVR 1FA0    ', '         The Unit        ']
    ['10/03', 'Sun', '10:00 pm', '    DVR 1FA0    ', 'Keeping Up With the K ...']
    ['10/03', 'Sun', '10:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/03', 'Sun', '10:30 pm', '     TivoS3     ', '    The Red Green Show   ']
    ['10/03', 'Sun', '11:00 am', '     TivoS3     ', '     Everyday Edisons    ']
    ['10/03', 'Sun', '11:00 am', '     TivoS3     ', '     McLaughlin Group    ']
    ['10/03', 'Sun', '11:00 pm', '     TivoS3     ', '         The Unit        ']
    ['10/03', 'Sun', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/03', 'Sun', '11:00 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/03', 'Sun', '12:30 pm', '    DVR 1FA0    ', '     Two Guys Garage     ']
    ['10/04', 'Mon', ' 2:00 am', '     TivoS3     ', '    Austin City Limits   ']
    ['10/04', 'Mon', ' 3:00 pm', '    DVR 1FA0    ', '    Muscle Car Workout   ']
    ['10/04', 'Mon', ' 3:03 am', '     TivoS4     ', '       Dateline NBC      ']
    ['10/04', 'Mon', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['10/04', 'Mon', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['10/04', 'Mon', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/04', 'Mon', ' 7:00 pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/04', 'Mon', ' 7:30 pm', '     TivoS4     ', '       The Simpsons      ']
    ['10/04', 'Mon', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/04', 'Mon', ' 8:00 pm', '    DVR 1FA0    ', '          Chuck          ']
    ['10/04', 'Mon', ' 9:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/04', 'Mon', ' 9:00 pm', '     TivoS4     ', '        The Event        ']
    ['10/04', 'Mon', ' 9:00 pm', '    DVR 1FA0    ', '        The Event        ']
    ['10/04', 'Mon', '10:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/04', 'Mon', '10:00 pm', '     TivoS3     ', '    Ask This Old House   ']
    ['10/04', 'Mon', '10:00 pm', '     TivoS4     ', '          Chase          ']
    ['10/04', 'Mon', '10:30 pm', '     TivoS3     ', '         Hometime        ']
    ['10/04', 'Mon', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/04', 'Mon', '11:00 pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/04', 'Mon', '11:00 pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/04', 'Mon', '11:30 pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/05', 'Tue', ' 1:00 am', '     TivoS4     ', '        South Park       ']
    ['10/05', 'Tue', ' 3:00 pm', '    DVR 1FA0    ', '    Muscle Car Workout   ']
    ['10/05', 'Tue', ' 5:00 pm', '     TivoS3     ', '         Adam-12         ']
    ['10/05', 'Tue', ' 6:00 pm', '     TivoS3     ', '        Emergency!       ']
    ['10/05', 'Tue', ' 7:00 pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/05', 'Tue', ' 7:30 pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/05', 'Tue', '11:00 am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/05', 'Tue', '12:00 am', '     TivoS3     ', '      Criminal Minds     ']
    ['10/05', 'Tue', '12:00 am', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    Press Enter
    
     9:49:49>
    
    There is more I'd like to do with it, such as breaking out the individual dvr's items into their own list for comparison, but I'm happy just getting the data!

    Note: This is a whole account list, not just a whole house list. 'DVR 1FA0' is a TiVo's name at my sister's house, one that I've been bugging them to get off my account and onto their own now for awhile! I don't really watch "Keeping up with..." or "Real Housewives of..."
     
  9. Sep 25, 2010 #9 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Ok, here's what I have come up with. It doesn't closely abide to PEP-8, and there's a LOT of duplicate code in the last chunk of logic. I'll chalk that up to python newbness. I have second copy that is a bit more verbose, printing certain events such as logging in, and which TiVo's ToDo List it's working on, but the following returns the data in two ways, first as a "condensed" list, showing date, time, TiVo and show, then as an expanded "per day" view, showing the date, then the hours of the day (incremented by 30 minutes) and any TiVos that have something scheduled within that 30 minutes. At this time, I don't have any show information other than the show title. Having a show's duration would be very useful, using that to determine how long a tuner would be tied up. This code assumes 30 minute show durations only. I'm pretty sure the information is at TiVo, so an enhancement may come along if this is well received.

    Once again, a TiVoToDo.conf file containing tivo.com login information is required to be in the same folder as the TiVoToDo.py file (see previous post).

    Code:
    #!/usr/bin/python
    #TiVoToDo.py
    
    import sys
    import os.path
    import urllib
    import urllib2
    import operator
    import cookielib
    import ConfigParser
    
    from time import sleep
    from HTMLParser import HTMLParser
    from collections import defaultdict
    
    p = os.path.dirname(__file__)
    config = ConfigParser.ConfigParser()
    config_files = ['/etc/TiVoToDo.conf', os.path.join(p, 'TiVoToDo.conf')]
    configs_found = config.read(config_files)
    
    if not configs_found:
        print ('ERROR: TiVoToDo.conf does not exist.\n' +
               'You must create this file before running TiVoToDo.')
        sys.exit(1)
    config.read(config_files)
    
    if not config.has_section('email'):
        print 'TiVo account email required in TiVoToDo.conf'
        sys.exit(1)
    email = config.get('email', 'email')
    
    if not config.has_section('password'):
        print 'TiVo account password required in TiVoToDo.conf'
        sys.exit(1)
    password = config.get('password', 'password')
    
    tdl = []
    ord_tdl = []
    header = {'User-agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}
    base_url = 'https://www3.tivo.com'
    todo_url = '/tivo-tco/go.do?def=tco.todo.page'
    npl_url = '/tivo-tco/go.do?def=tco.nowplaying.page'
    
    def hour_table(table):
        table = []
        for h in range(0, 24):
            per = 'am'
            if h < 1:
                hrs = '12'
            if h >= 1:
                hrs = str(h).rjust(2,' ')
            if h > 11:
                per = 'pm'
            if h > 12:
                hrs = str(h - 12).rjust(2,' ')
            table.append(hrs + ':00')
            table.append(per)
            table.append(hrs + ':30')
            table.append(per)
        return table
    
    cookiefile = 'cookies.lwp'
    urlopen = urllib2.urlopen
    Request = urllib2.Request
    cj      = cookielib.LWPCookieJar()
    
    if os.path.isfile(cookiefile):
        cj.load(cookiefile)
    
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
    urllib2.install_opener(opener)
    
    class TagParser(HTMLParser):
        tdl = []
        tsns = []
        tivos = []
        current_tivo = None
        noShows = False
        def __init__(self):
            HTMLParser.__init__(self)
            self.a_flag = False
            self.a_data = ''
            self.get_data = False
            self.option_flag = False
            self.select_flag = False
            self.span_count = 0
            self.span_flag = False
            self.span_tags = ['day', 'date', 'time']
    
        def handle_starttag(self, tag, attrs):
            if tag == 'a' and page != 'NPL' and attrs != []:
                if attrs[0][1] == 'trigger':
                    self.a_flag = True
                    self.get_data = True
    
            if tag == 'div' and page != 'NPL' and attrs != []:
                if attrs[0][1] == 'noShows':
                    TagParser.noShows = True
    
            if tag == 'option' and self.select_flag and \
               attrs[0][0] =='value' and page == 'NPL':
                self.option_flag = True
                self.get_data = True
                TagParser.tsns.append(attrs[0][1])
    
            if tag == 'select' and attrs[0][1] == 'DVRlist':
                self.select_flag = True
    
            if tag == 'span' and attrs[0][1] in self.span_tags and page != 'NPL':
                self.span_flag = True
                self.get_data = True
                self.span_count += 1
    
        def handle_data(self, data):
            if self.get_data:
                if self.span_flag:
                    TagParser.tdl.append(data)
    
                if self.a_flag:
                    self.a_data = self.a_data + data
    
                if self.option_flag:
                    TagParser.tivos.append(data)
    
        def handle_endtag(self, tag):
            if tag == 'a' and self.a_flag:
                TagParser.tdl.append(self.a_data.rstrip('\n '))
                TagParser.tdl.append(TagParser.current_tivo)
                self.a_data = ''
                self.a_flag = False
            self.get_data = False
            self.span_flag = False
            self.option_flag = False
            if tag == 'select':
                self.select_flag = False
    
    parser  = TagParser()
    
    def login(target_url, email, password):
        url = target_url + '/tivo-tco/login.do'
        login_data = urllib.urlencode({
            'cams_cb_partner': None,
            'cams_security_domain': 'tivocom',
            'cams_login_config': 'http',
            'cams_original_url': npl_url,
            'cams_cb_username': email,
            'cams_cb_password': password,
            'remember_email': 'true',
            'cams_cb_rememberme': 'true'
        })
        return url, login_data
    
    def request_url(url, data=None, header=header):
        if data is None:
            data = None
        try:
            req = Request(url, data, header)
            handle = urlopen(req)
        except IOError, e:
            print 'We failed to open "&#37;s".' % url
            if hasattr(e, 'code'):
                print 'We failed with error code - %s.' % e.code
                exit()
        else:
            result = handle.read()
            parser.feed(result)
            parser.close()
            parser.reset()
    
    def isHDtivo(tsn):  # tsn's of High Definition Tivo's
        return bool(tsn and tsn[0] >= '6' and tsn[:3] != '649')
    
    page = 'NPL'
    url, login_data = login(base_url, email, password)
    request_url(url, login_data, header)
    
    tivos = dict(zip(parser.tivos, parser.tsns))
    
    def sort_table(table, cols):
        """ sort a table by multiple columns
            table: a list of lists (or tuple of tuples) where each inner list
                   represents a row
            cols:  a list (or tuple) specifying the column numbers to sort by
                   e.g. (1,0) would sort by column 1, then by column 0
        """
        for col in reversed(cols):
            table = sorted(table, key=operator.itemgetter(col))
        return table
    
    for tivo, tsn in tivos.iteritems():
        TagParser.noShows = False
        if isHDtivo(tsn):
            TagParser.current_tivo = tivo
            page = 'ToDo'
            offset = 0
    
            while not TagParser.noShows:
                url = base_url + todo_url + '&tsn=' + tsn + '&offset=%d' % offset
                offset += 20
                login_data = None
                request_url(url, login_data, header)
                sleep(1)
    
    raw_tdl = parser.tdl
    
    for i in range(5, len(raw_tdl), 5):
        nl = raw_tdl[i-5:i]
        a = nl[1].partition('/')
        a = a[0].rjust(2,'0') + a[1] + a[2].rjust(2,'0')
        b = nl[2].rjust(8)[:5]
        c = nl[2][-2:]
        ord_tdl.append([a, nl[0], b, c, nl[4].center(16), nl[3].center(25)])
    
    for row in sort_table(ord_tdl, (0, 3, 2, 4)):
        tdl.append(row)
    
    for i in range(len(tdl)):
        if i != len(tdl) - 1:
            if tdl[i - 1][:1] != tdl[i][:1]:
                print
        print tdl[i]
    
    print
    x = raw_input("Press Enter when ready to see dates.")
    print
    
    hp = []
    hp = hour_table(hp)
    fnd_list = hp
    fnd_tivos = ''
    
    for a in range(len(tdl)):
        tdl_row = tdl[a]
        tdl_end = len(tdl) - 1
        tdl_date = tdl_row[0]
        tdl_wday = tdl_row[1]
        tdl_time = tdl_row[2]
        tdl_per  = tdl_row[3]
        tdl_tivo = tdl_row[4]
        tdl_show = tdl_row[5]
        if a != tdl_end:
            tdl_nrow = tdl[a + 1]
            tdl_nper = tdl_nrow[3]
            tdl_ndate = tdl_nrow[0]
            tdl_ntime = tdl_nrow[2]
            if tdl_date == tdl_ndate:
                for b in range(0, len(hp), 2):
                    hp_end = len(hp) - 2
                    hp_time  = hp[b]
                    hp_per   = hp[b + 1]
                    if b != hp_end:
                        hp_ntime = hp[b + 2]
                        hp_nper  = hp[b + 3]
                        if tdl_time >= hp_time and tdl_time < hp_ntime and tdl_per == hp_per:
                            if tdl_ntime >= hp_time and tdl_ntime < hp_ntime and tdl_nper == hp_per:
                                fnd_tivos = fnd_tivos + ' [' + tdl_tivo + ']'
                            else:
                                fnd_tivos = hp_time + ' ' + hp_per + fnd_tivos + ' [' + tdl_tivo + ']'
                                fnd_list.pop(b)
                                fnd_list.insert(b, fnd_tivos)
                                fnd_tivos = ''
                    else:
                        if tdl_time >= hp_time and tdl_per == hp_per:
                            fnd_tivos = hp_time + ' ' + hp_per + fnd_tivos + ' [' + tdl_tivo + ']'
                            fnd_list.pop(b)
                            fnd_list.insert(b, fnd_tivos)
                            fnd_tivos = ''
            else:
                for b in range(0, len(hp), 2):
                    hp_end = len(hp) - 2
                    hp_time  = hp[b]
                    hp_per   = hp[b + 1]
                    if b != hp_end:
                        hp_ntime = hp[b + 2]
                        hp_nper  = hp[b + 3]
                        if tdl_time >= hp_time and tdl_time < hp_ntime and tdl_per == hp_per:
                            if tdl_ntime >= hp_time and tdl_ntime < hp_ntime and tdl_nper == hp_per:
                                fnd_tivos = fnd_tivos + ' [' + tdl_tivo + ']'
                            else:
                                fnd_tivos = hp_time + ' ' + hp_per + fnd_tivos + ' [' + tdl_tivo + ']'
                                fnd_list.pop(b)
                                fnd_list.insert(b, fnd_tivos)
                                fnd_tivos = ''
                    else:
                        if tdl_time >= hp_time and tdl_per == hp_per:
                            fnd_tivos = hp_time + ' ' + hp_per + fnd_tivos + ' [' + tdl_tivo + ']'
                            fnd_list.pop(b)
                            fnd_list.insert(b, fnd_tivos)
                            fnd_tivos = ''
                print tdl_wday + ', ' + tdl_date
                for b in range(0, len(fnd_list), 2):
                    if len(fnd_list[b]) == 5:
                        fnd_list[b] = fnd_list[b] + ' ' + fnd_list[b + 1]
                    if b == 48:
                        print
                    print fnd_list[b]
                hp = hour_table(hp)
                fnd_list = []
                fnd_list = hp
                fnd_tivos = ''
                print
                x = raw_input("Press Enter to see the next date.")
                print
        else:
            print tdl_wday + ', ' + tdl_date
            for b in range(0, len(hp), 2):
                hp_end = len(hp) - 2
                hp_time  = hp[b]
                hp_per   = hp[b + 1]
                if b != hp_end:
                    hp_ntime = hp[b + 2]
                    hp_nper  = hp[b + 3]
                    if tdl_time >= hp_time and tdl_time < hp_ntime and tdl_per == hp_per:
                        fnd_tivos = hp_time + ' ' + hp_per + fnd_tivos + ' [' + tdl_tivo + ']'
                        fnd_list.pop(b)
                        fnd_list.insert(b, fnd_tivos)
                        fnd_tivos = ''
                else:
                    if tdl_time >= hp_time and tdl_per == hp_per:
                        fnd_tivos = hp_time + ' ' + hp_per + fnd_tivos + ' [' + tdl_tivo + ']'
                        fnd_list.pop(b)
                        fnd_list.insert(b, fnd_tivos)
                        fnd_tivos = ''
            for b in range(0, len(fnd_list), 2):
                if len(fnd_list[b]) == 5:
                    fnd_list[b] = fnd_list[b] + ' ' + fnd_list[b + 1]
                if b == 48:
                    print
                print fnd_list[b]
    
    print
    for tivo, tsn in tivos.iteritems():
        if isHDtivo(tsn):
            print tivo.ljust(8), 'has %3d recodings scheduled' % raw_tdl.count(tivo)
    
    print
    
    x = raw_input("Press Enter to exit")
    exit ()
    
    And the result:
    Code:
    14:28:36>TiVoToDo.py
    
    ['09/25', 'Sat', ' 1:30', 'pm', '     TivoS3     ', "    Woodwright's Shop    "]
    ['09/25', 'Sat', ' 3:00', 'pm', '     TivoS3     ', '   New Yankee Workshop   ']
    ['09/25', 'Sat', ' 3:00', 'pm', '     TivoS4     ', '         Rawhide         ']
    ['09/25', 'Sat', ' 4:00', 'pm', '     TivoS4     ', '         Rawhide         ']
    ['09/25', 'Sat', ' 5:00', 'pm', '     TivoS3     ', '    Ask This Old House   ']
    ['09/25', 'Sat', ' 5:30', 'pm', '     TivoS3     ', '      This Old House     ']
    ['09/25', 'Sat', ' 6:00', 'pm', '     TivoS3     ', '         Hometime        ']
    ['09/25', 'Sat', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/25', 'Sat', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/25', 'Sat', ' 8:00', 'pm', '     TivoS4     ', '           Cops          ']
    ['09/25', 'Sat', '10:00', 'pm', '     TivoS3     ', '     48 Hours Mystery    ']
    ['09/25', 'Sat', '10:00', 'pm', '     TivoS4     ', 'Law & Order: Special  ...']
    
    ['09/26', 'Sun', ' 2:05', 'am', '     TivoS4     ', '   Legend of the Seeker  ']
    ['09/26', 'Sun', ' 4:00', 'am', '     TivoS3     ', '    Austin City Limits   ']
    ['09/26', 'Sun', '11:00', 'am', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/26', 'Sun', '11:00', 'am', '     TivoS3     ', '     McLaughlin Group    ']
    ['09/26', 'Sun', ' 6:30', 'pm', '     TivoS4     ', '       The Simpsons      ']
    ['09/26', 'Sun', ' 7:30', 'pm', '     TivoS4     ', '        60 Minutes       ']
    ['09/26', 'Sun', ' 8:00', 'pm', '     TivoS4     ', '       The Simpsons      ']
    ['09/26', 'Sun', ' 8:30', 'pm', '     TivoS4     ', '    The Cleveland Show   ']
    ['09/26', 'Sun', ' 9:00', 'pm', '     TivoS4     ', '        Family Guy       ']
    ['09/26', 'Sun', '10:00', 'pm', '    DVR 1FA0    ', '         The Unit        ']
    ['09/26', 'Sun', '10:00', 'pm', '    DVR 1FA0    ', 'Keeping Up With the K ...']
    ['09/26', 'Sun', '10:30', 'pm', '     TivoS3     ', '    The Red Green Show   ']
    ['09/26', 'Sun', '10:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/26', 'Sun', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/26', 'Sun', '11:00', 'pm', '     TivoS3     ', '         The Unit        ']
    ['09/26', 'Sun', '11:00', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/26', 'Sun', '11:00', 'pm', '    DVR 1FA0    ', '         The Unit        ']
    ['09/26', 'Sun', '11:30', 'pm', '    DVR 1FA0    ', '        The Reader       ']
    
    ['09/27', 'Mon', ' 1:35', 'am', '     TivoS4     ', '   Legend of the Seeker  ']
    ['09/27', 'Mon', ' 2:00', 'am', '     TivoS3     ', '    Austin City Limits   ']
    ['09/27', 'Mon', ' 2:05', 'am', '     TivoS4     ', '       Dateline NBC      ']
    ['09/27', 'Mon', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/27', 'Mon', '12:00', 'am', '     TivoS4     ', '  Alfred Hitchcock Hour  ']
    ['09/27', 'Mon', ' 3:00', 'pm', '    DVR 1FA0    ', '    Muscle Car Workout   ']
    ['09/27', 'Mon', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['09/27', 'Mon', ' 5:30', 'pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/27', 'Mon', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['09/27', 'Mon', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/27', 'Mon', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/27', 'Mon', ' 7:30', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/27', 'Mon', ' 8:00', 'pm', '    DVR 1FA0    ', '          Chuck          ']
    ['09/27', 'Mon', ' 9:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/27', 'Mon', ' 9:00', 'pm', '     TivoS4     ', '        The Event        ']
    ['09/27', 'Mon', ' 9:00', 'pm', '    DVR 1FA0    ', '        The Event        ']
    ['09/27', 'Mon', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/27', 'Mon', '10:00', 'pm', '     TivoS3     ', '    Ask This Old House   ']
    ['09/27', 'Mon', '10:00', 'pm', '     TivoS4     ', '          Chase          ']
    ['09/27', 'Mon', '10:30', 'pm', '     TivoS3     ', '         Hometime        ']
    ['09/27', 'Mon', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/27', 'Mon', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/27', 'Mon', '11:00', 'pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/27', 'Mon', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['09/28', 'Tue', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['09/28', 'Tue', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/28', 'Tue', '12:00', 'am', '     TivoS3     ', '      Criminal Minds     ']
    ['09/28', 'Tue', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['09/28', 'Tue', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['09/28', 'Tue', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/28', 'Tue', ' 8:00', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/28', 'Tue', ' 9:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/28', 'Tue', '10:00', 'pm', '     TivoS3     ', '      This Old House     ']
    ['09/28', 'Tue', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/28', 'Tue', '10:30', 'pm', '     TivoS3     ', '   New Yankee Workshop   ']
    ['09/28', 'Tue', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/28', 'Tue', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/28', 'Tue', '11:00', 'pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/28', 'Tue', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['09/29', 'Wed', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['09/29', 'Wed', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/29', 'Wed', '12:00', 'am', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['09/29', 'Wed', ' 5:30', 'pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/29', 'Wed', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['09/29', 'Wed', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/29', 'Wed', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/29', 'Wed', ' 7:30', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/29', 'Wed', ' 8:00', 'pm', '     TivoS3     ', "      Hell's Kitchen     "]
    ['09/29', 'Wed', ' 8:00', 'pm', '     TivoS4     ', '        The Middle       ']
    ['09/29', 'Wed', ' 9:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', ' 9:00', 'pm', '     TivoS4     ', 'Law & Order: Special  ...']
    ['09/29', 'Wed', ' 9:00', 'pm', '    DVR 1FA0    ', '         The Unit        ']
    ['09/29', 'Wed', ' 9:31', 'pm', '     TivoS4     ', '       Cougar Town       ']
    ['09/29', 'Wed', '10:00', 'pm', '     TivoS3     ', '     The Whole Truth     ']
    ['09/29', 'Wed', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', '10:00', 'pm', '     TivoS4     ', '     The Whole Truth     ']
    ['09/29', 'Wed', '10:00', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/29', 'Wed', '10:00', 'pm', '    DVR 1FA0    ', '      The Defenders      ']
    ['09/29', 'Wed', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/29', 'Wed', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/29', 'Wed', '11:00', 'pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/29', 'Wed', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['09/30', 'Thu', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['09/30', 'Thu', '10:30', 'am', '     TivoS4     ', "Art Wolfe's Travels t ..."]
    ['09/30', 'Thu', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['09/30', 'Thu', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['09/30', 'Thu', ' 5:30', 'pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['09/30', 'Thu', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['09/30', 'Thu', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['09/30', 'Thu', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['09/30', 'Thu', ' 7:30', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['09/30', 'Thu', ' 8:00', 'pm', '     TivoS3     ', '     Nova scienceNOW     ']
    ['09/30', 'Thu', ' 8:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/30', 'Thu', ' 8:00', 'pm', '     TivoS4     ', '        Community        ']
    ['09/30', 'Thu', ' 8:00', 'pm', '    DVR 1FA0    ', '   The Big Bang Theory   ']
    ['09/30', 'Thu', ' 8:30', 'pm', '     TivoS4     ', '         30 Rock         ']
    ['09/30', 'Thu', ' 9:00', 'pm', '     TivoS3     ', 'CSI: Crime Scene Inve ...']
    ['09/30', 'Thu', ' 9:00', 'pm', '     TivoS3     ', '           NOVA          ']
    ['09/30', 'Thu', ' 9:00', 'pm', '     TivoS4     ', '        The Office       ']
    ['09/30', 'Thu', ' 9:00', 'pm', '     TivoS4     ', '          Nikita         ']
    ['09/30', 'Thu', ' 9:00', 'pm', '    DVR 1FA0    ', 'The Real Housewives o ...']
    ['09/30', 'Thu', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/30', 'Thu', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['09/30', 'Thu', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['09/30', 'Thu', '11:00', 'pm', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['09/30', 'Thu', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['10/01', 'Fri', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['10/01', 'Fri', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/01', 'Fri', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['10/01', 'Fri', ' 5:30', 'pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['10/01', 'Fri', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['10/01', 'Fri', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/01', 'Fri', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/01', 'Fri', ' 7:30', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/01', 'Fri', ' 8:00', 'pm', '     TivoS4     ', '       Dateline NBC      ']
    ['10/01', 'Fri', ' 8:00', 'pm', '     TivoS4     ', '        Smallville       ']
    ['10/01', 'Fri', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/01', 'Fri', '10:00', 'pm', '     TivoS4     ', '          Outlaw         ']
    ['10/01', 'Fri', '10:00', 'pm', '     TivoS4     ', '          20/20          ']
    ['10/01', 'Fri', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/01', 'Fri', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/01', 'Fri', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['10/02', 'Sat', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['10/02', 'Sat', ' 1:01', 'am', '    DVR 1FA0    ', '        Rescue Me        ']
    ['10/02', 'Sat', '12:00', 'am', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['10/02', 'Sat', ' 1:30', 'pm', '     TivoS3     ', "    Woodwright's Shop    "]
    ['10/02', 'Sat', ' 3:00', 'pm', '     TivoS3     ', '   New Yankee Workshop   ']
    ['10/02', 'Sat', ' 3:00', 'pm', '     TivoS4     ', '         Rawhide         ']
    ['10/02', 'Sat', ' 4:00', 'pm', '     TivoS4     ', '         Rawhide         ']
    ['10/02', 'Sat', ' 5:00', 'pm', '     TivoS3     ', '    Ask This Old House   ']
    ['10/02', 'Sat', ' 6:00', 'pm', '     TivoS3     ', '         Hometime        ']
    ['10/02', 'Sat', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/02', 'Sat', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/02', 'Sat', ' 8:00', 'pm', '     TivoS4     ', '           Cops          ']
    ['10/02', 'Sat', '10:00', 'pm', '     TivoS4     ', 'Law & Order: Special  ...']
    
    ['10/03', 'Sun', ' 2:05', 'am', '     TivoS4     ', '   Legend of the Seeker  ']
    ['10/03', 'Sun', '11:00', 'am', '     TivoS3     ', '     McLaughlin Group    ']
    ['10/03', 'Sun', '11:00', 'am', '     TivoS3     ', '     Everyday Edisons    ']
    ['10/03', 'Sun', ' 7:00', 'pm', '     TivoS4     ', '        60 Minutes       ']
    ['10/03', 'Sun', ' 8:00', 'pm', '     TivoS4     ', '       The Simpsons      ']
    ['10/03', 'Sun', ' 8:30', 'pm', '     TivoS4     ', '    The Cleveland Show   ']
    ['10/03', 'Sun', ' 9:00', 'pm', '     TivoS4     ', '        Family Guy       ']
    ['10/03', 'Sun', ' 9:30', 'pm', '     TivoS4     ', '       American Dad      ']
    ['10/03', 'Sun', '10:00', 'pm', '     TivoS3     ', '         The Unit        ']
    ['10/03', 'Sun', '10:00', 'pm', '    DVR 1FA0    ', '         The Unit        ']
    ['10/03', 'Sun', '10:00', 'pm', '    DVR 1FA0    ', 'Keeping Up With the K ...']
    ['10/03', 'Sun', '10:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/03', 'Sun', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/03', 'Sun', '11:00', 'pm', '     TivoS3     ', '         The Unit        ']
    ['10/03', 'Sun', '11:00', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/03', 'Sun', '12:30', 'pm', '    DVR 1FA0    ', '     Two Guys Garage     ']
    
    ['10/04', 'Mon', ' 2:00', 'am', '     TivoS3     ', '    Austin City Limits   ']
    ['10/04', 'Mon', ' 3:03', 'am', '     TivoS4     ', '       Dateline NBC      ']
    ['10/04', 'Mon', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/04', 'Mon', ' 3:00', 'pm', '    DVR 1FA0    ', '    Muscle Car Workout   ']
    ['10/04', 'Mon', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['10/04', 'Mon', ' 5:30', 'pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['10/04', 'Mon', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['10/04', 'Mon', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/04', 'Mon', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/04', 'Mon', ' 7:30', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/04', 'Mon', ' 7:30', 'pm', '     TivoS4     ', '       The Simpsons      ']
    ['10/04', 'Mon', ' 8:00', 'pm', '    DVR 1FA0    ', '          Chuck          ']
    ['10/04', 'Mon', ' 9:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/04', 'Mon', ' 9:00', 'pm', '     TivoS4     ', '        The Event        ']
    ['10/04', 'Mon', ' 9:00', 'pm', '    DVR 1FA0    ', '        The Event        ']
    ['10/04', 'Mon', '10:00', 'pm', '     TivoS3     ', '    Ask This Old House   ']
    ['10/04', 'Mon', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/04', 'Mon', '10:00', 'pm', '     TivoS4     ', '          Chase          ']
    ['10/04', 'Mon', '10:30', 'pm', '     TivoS3     ', '         Hometime        ']
    ['10/04', 'Mon', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/04', 'Mon', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/04', 'Mon', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['10/05', 'Tue', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['10/05', 'Tue', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/05', 'Tue', '12:00', 'am', '     TivoS3     ', '      Criminal Minds     ']
    ['10/05', 'Tue', '12:00', 'am', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['10/05', 'Tue', ' 3:00', 'pm', '    DVR 1FA0    ', '    Muscle Car Workout   ']
    ['10/05', 'Tue', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['10/05', 'Tue', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['10/05', 'Tue', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/05', 'Tue', ' 7:30', 'pm', '     TivoS4     ', '       The Simpsons      ']
    ['10/05', 'Tue', ' 8:00', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/05', 'Tue', ' 9:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/05', 'Tue', ' 9:00', 'pm', '     TivoS3     ', '    Austin City Limits   ']
    ['10/05', 'Tue', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/05', 'Tue', '10:30', 'pm', '     TivoS3     ', '   New Yankee Workshop   ']
    ['10/05', 'Tue', '10:30', 'pm', '    DVR 1FA0    ', '   Chasing Classic Cars  ']
    ['10/05', 'Tue', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/05', 'Tue', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/05', 'Tue', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['10/06', 'Wed', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['10/06', 'Wed', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/06', 'Wed', '12:00', 'am', '     TivoS3     ', '      Criminal Minds     ']
    ['10/06', 'Wed', '12:00', 'am', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['10/06', 'Wed', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['10/06', 'Wed', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['10/06', 'Wed', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/06', 'Wed', ' 7:30', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/06', 'Wed', ' 7:30', 'pm', '     TivoS4     ', '       The Simpsons      ']
    ['10/06', 'Wed', ' 8:00', 'pm', '     TivoS3     ', "      Hell's Kitchen     "]
    ['10/06', 'Wed', ' 8:00', 'pm', '     TivoS4     ', '        The Middle       ']
    ['10/06', 'Wed', ' 9:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/06', 'Wed', ' 9:00', 'pm', '     TivoS4     ', 'Law & Order: Special  ...']
    ['10/06', 'Wed', ' 9:31', 'pm', '     TivoS4     ', '       Cougar Town       ']
    ['10/06', 'Wed', '10:00', 'pm', '     TivoS3     ', '     The Whole Truth     ']
    ['10/06', 'Wed', '10:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/06', 'Wed', '10:00', 'pm', '     TivoS4     ', '     The Whole Truth     ']
    ['10/06', 'Wed', '10:00', 'pm', '     TivoS4     ', '    Muscle Car Workout   ']
    ['10/06', 'Wed', '11:00', 'pm', '     TivoS3     ', "      That '70s Show     "]
    ['10/06', 'Wed', '11:00', 'pm', '     TivoS3     ', '      Criminal Minds     ']
    ['10/06', 'Wed', '11:30', 'pm', '     TivoS3     ', "      That '70s Show     "]
    
    ['10/07', 'Thu', ' 1:00', 'am', '     TivoS4     ', '        South Park       ']
    ['10/07', 'Thu', '10:30', 'am', '     TivoS4     ', "Art Wolfe's Travels t ..."]
    ['10/07', 'Thu', '11:00', 'am', '     TivoS4     ', 'Star Trek: The Next G ...']
    ['10/07', 'Thu', '12:00', 'am', '     TivoS4     ', 'Alfred Hitchcock Pres ...']
    ['10/07', 'Thu', ' 5:00', 'pm', '     TivoS3     ', '         Adam-12         ']
    ['10/07', 'Thu', ' 5:30', 'pm', '     TivoS3     ', '     Everyday Edisons    ']
    ['10/07', 'Thu', ' 6:00', 'pm', '     TivoS3     ', '        Emergency!       ']
    ['10/07', 'Thu', ' 7:00', 'pm', '     TivoS4     ', '        Jeopardy!        ']
    ['10/07', 'Thu', ' 7:00', 'pm', '     TivoS4     ', '    Petticoat Junction   ']
    ['10/07', 'Thu', ' 7:30', 'pm', '     TivoS4     ', '       The Simpsons      ']
    
    Press Enter when ready to see dates.
    
    Sat, 09/25
    12:00 am
    12:30 am
     1:00 am
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm [     TivoS3     ]
     2:00 pm
     2:30 pm
     3:00 pm [     TivoS3     ] [     TivoS4     ]
     3:30 pm
     4:00 pm [     TivoS4     ]
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm [     TivoS3     ]
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm
     8:00 pm [     TivoS4     ]
     8:30 pm
     9:00 pm
     9:30 pm
    10:00 pm [     TivoS3     ] [     TivoS4     ]
    10:30 pm
    11:00 pm
    11:30 pm
    
    Press Enter to see the next date.
    
    Sun, 09/26
    12:00 am
    12:30 am
     1:00 am
     1:30 am
     2:00 am [     TivoS4     ]
     2:30 am
     3:00 am
     3:30 am
     4:00 am [     TivoS3     ]
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS3     ] [     TivoS3     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm
     5:30 pm
     6:00 pm
     6:30 pm [     TivoS4     ]
     7:00 pm
     7:30 pm [     TivoS4     ]
     8:00 pm [     TivoS4     ]
     8:30 pm [     TivoS4     ]
     9:00 pm [     TivoS4     ]
     9:30 pm
    10:00 pm [    DVR 1FA0    ] [    DVR 1FA0    ]
    10:30 pm [     TivoS3     ] [     TivoS3     ]
    11:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ] [    DVR 1FA0    ]
    11:30 pm [    DVR 1FA0    ]
    
    Press Enter to see the next date.
    
    Mon, 09/27
    12:00 am [     TivoS4     ]
    12:30 am
     1:00 am
     1:30 am [     TivoS4     ]
     2:00 am [     TivoS3     ] [     TivoS4     ]
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm [    DVR 1FA0    ]
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm [     TivoS3     ]
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm [     TivoS4     ]
     8:00 pm [    DVR 1FA0    ]
     8:30 pm
     9:00 pm [     TivoS3     ] [     TivoS4     ] [    DVR 1FA0    ]
     9:30 pm
    10:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ]
    10:30 pm [     TivoS3     ]
    11:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Tue, 09/28
    12:00 am [     TivoS3     ]
    12:30 am
     1:00 am [     TivoS4     ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ]
     7:30 pm
     8:00 pm [     TivoS4     ]
     8:30 pm
     9:00 pm [     TivoS3     ]
     9:30 pm
    10:00 pm [     TivoS3     ] [     TivoS3     ]
    10:30 pm [     TivoS3     ]
    11:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Wed, 09/29
    12:00 am [     TivoS3     ]
    12:30 am
     1:00 am [     TivoS4     ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm [     TivoS3     ]
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm [     TivoS4     ]
     8:00 pm [     TivoS3     ] [     TivoS4     ]
     8:30 pm
     9:00 pm [     TivoS3     ] [     TivoS4     ] [    DVR 1FA0    ]
     9:30 pm [     TivoS4     ]
    10:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ] [     TivoS4     ] [    DVR 1FA0    ]
    10:30 pm
    11:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Thu, 09/30
    12:00 am
    12:30 am
     1:00 am [     TivoS4     ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am [     TivoS4     ]
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm [     TivoS3     ]
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm [     TivoS4     ]
     8:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ] [    DVR 1FA0    ]
     8:30 pm [     TivoS4     ]
     9:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ] [     TivoS4     ] [    DVR 1FA0    ]
     9:30 pm
    10:00 pm [     TivoS3     ]
    10:30 pm
    11:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Fri, 10/01
    12:00 am
    12:30 am
     1:00 am [     TivoS4     ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm [     TivoS3     ]
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm [     TivoS4     ]
     8:00 pm [     TivoS4     ] [     TivoS4     ]
     8:30 pm
     9:00 pm
     9:30 pm
    10:00 pm [     TivoS3     ] [     TivoS4     ] [     TivoS4     ]
    10:30 pm
    11:00 pm [     TivoS3     ] [     TivoS3     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Sat, 10/02
    12:00 am [     TivoS4     ]
    12:30 am
     1:00 am [     TivoS4     ] [    DVR 1FA0    ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm [     TivoS3     ]
     2:00 pm
     2:30 pm
     3:00 pm [     TivoS3     ] [     TivoS4     ]
     3:30 pm
     4:00 pm [     TivoS4     ]
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm
     8:00 pm [     TivoS4     ]
     8:30 pm
     9:00 pm
     9:30 pm
    10:00 pm [     TivoS4     ]
    10:30 pm
    11:00 pm
    11:30 pm
    
    Press Enter to see the next date.
    
    Sun, 10/03
    12:00 am
    12:30 am
     1:00 am
     1:30 am
     2:00 am [     TivoS4     ]
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS3     ] [     TivoS3     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm
     5:30 pm
     6:00 pm
     6:30 pm
     7:00 pm [     TivoS4     ]
     7:30 pm
     8:00 pm [     TivoS4     ]
     8:30 pm [     TivoS4     ]
     9:00 pm [     TivoS4     ]
     9:30 pm [     TivoS4     ]
    10:00 pm [     TivoS3     ] [    DVR 1FA0    ] [    DVR 1FA0    ]
    10:30 pm [     TivoS3     ]
    11:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ]
    11:30 pm [    DVR 1FA0    ]
    
    Press Enter to see the next date.
    
    Mon, 10/04
    12:00 am
    12:30 am
     1:00 am
     1:30 am
     2:00 am [     TivoS3     ]
     2:30 am
     3:00 am [     TivoS4     ]
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm [    DVR 1FA0    ]
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm [     TivoS3     ]
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm [     TivoS4     ] [     TivoS4     ]
     8:00 pm [    DVR 1FA0    ]
     8:30 pm
     9:00 pm [     TivoS3     ] [     TivoS4     ] [    DVR 1FA0    ]
     9:30 pm
    10:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ]
    10:30 pm [     TivoS3     ]
    11:00 pm [     TivoS3     ] [     TivoS3     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Tue, 10/05
    12:00 am [     TivoS3     ] [     TivoS4     ]
    12:30 am
     1:00 am [     TivoS4     ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm [    DVR 1FA0    ]
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ]
     7:30 pm [     TivoS4     ]
     8:00 pm [     TivoS4     ]
     8:30 pm
     9:00 pm [     TivoS3     ] [     TivoS3     ]
     9:30 pm
    10:00 pm [     TivoS3     ]
    10:30 pm [     TivoS3     ] [    DVR 1FA0    ]
    11:00 pm [     TivoS3     ] [     TivoS3     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Wed, 10/06
    12:00 am [     TivoS3     ] [     TivoS4     ]
    12:30 am
     1:00 am [     TivoS4     ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ]
     7:30 pm [     TivoS4     ] [     TivoS4     ]
     8:00 pm [     TivoS3     ] [     TivoS4     ]
     8:30 pm
     9:00 pm [     TivoS3     ] [     TivoS4     ]
     9:30 pm [     TivoS4     ]
    10:00 pm [     TivoS3     ] [     TivoS3     ] [     TivoS4     ] [     TivoS4     ]
    10:30 pm
    11:00 pm [     TivoS3     ] [     TivoS3     ]
    11:30 pm [     TivoS3     ]
    
    Press Enter to see the next date.
    
    Thu, 10/07
    12:00 am [     TivoS4     ]
    12:30 am
     1:00 am [     TivoS4     ]
     1:30 am
     2:00 am
     2:30 am
     3:00 am
     3:30 am
     4:00 am
     4:30 am
     5:00 am
     5:30 am
     6:00 am
     6:30 am
     7:00 am
     7:30 am
     8:00 am
     8:30 am
     9:00 am
     9:30 am
    10:00 am
    10:30 am [     TivoS4     ]
    11:00 am [     TivoS4     ]
    11:30 am
    
    12:00 pm
    12:30 pm
     1:00 pm
     1:30 pm
     2:00 pm
     2:30 pm
     3:00 pm
     3:30 pm
     4:00 pm
     4:30 pm
     5:00 pm [     TivoS3     ]
     5:30 pm [     TivoS3     ]
     6:00 pm [     TivoS3     ]
     6:30 pm
     7:00 pm [     TivoS4     ] [     TivoS4     ]
     7:30 pm [     TivoS4     ]
     8:00 pm
     8:30 pm
     9:00 pm
     9:30 pm
    10:00 pm
    10:30 pm
    11:00 pm
    11:30 pm
    
    TivoS3   has 107 recodings scheduled
    DVR 1FA0 has  20 recodings scheduled
    TivoS4   has 107 recodings scheduled
    
    Press Enter to exit
    
    14:35:39>
    
     
  10. Sep 25, 2010 #10 of 182
    tomm1079

    tomm1079 New Member

    567
    0
    May 10, 2005
    wow this is really nice man. Very good job on this.

    glad to see this kind of progress. I was trying to figure out a way to setup a webpage on my Windows Home server that i could access to see if i had anything conflicting for remote scheduling. This makes it even more possible.

    I feel someone with more knowledge then me will come up with Coop scheduling based on this.
     
  11. Sep 26, 2010 #11 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Thank you!
    I'm positive the code could be written more efficiently, but my programming experience isn't object oriented. That said, I do like python, and I'll continue to hone my skills with it.

    As far as cooperative scheduling, I think that the possibility may exist after looking at the HTML from the various tivo TCO pages. The To Do List pages I parse to get the date, time and (partial) show title has "href" links that can be manipulated to get to a show's details (footnote 1). Here's an example for "That 70's Show":

    Code:
    https://www3.tivo.com/tivo-tco/go.do?def=dvrmgmt.details.snippet.page&contentId=tivo:ct.60369985&collectionId=tivo:cl.17211&hdtv=false
    
    Gather collectionId and contentId, and apply it to a slightly different base url to produce a link to the full description:
    Code:
    https://www3.tivo.com/tivo-tco/program/show.do?collectionId=tivo:cl.17211&contentId=tivo:ct.60369985
    Now that resulting page is indeed VERY interesting! It has links for "1-Click Record", "1-Click Season Pass", and "Record with options". I took the href'ed link in "1-Click Season Pass", and added "&tsn=<one of my TiVo's TSN's>", and successfully added a Season Pass to the TiVo that wasn't selected in the browser!

    Code:
    https://www3.tivo.com/tivo-tco/1clickseason.do?offerId=tivo:of.ctd.10420545.27-1.terrestrial.2010-09-27-03-00-00.1800&tsn=<one of my TiVo's TSN's>
    This page offers the recording options as well, but the show is provided in a Search term:
    Code:
    https://www3.tivo.com/tivo-tco/search/simple.do?dispatch=simplesearch&searchFor=That+70's+Show&submit_button=
    There are a lot of pieces that I think could be put together to at least get a backup of Season Passes, possibly a way to restore from that backup (footnote 2), and provide the cooperative scheduling that people want.

    Footnotes:
    1. The show's duration is provided in these details, which may be added to the existing TiVoToDo.py for a more accurate representation of what DVR is recording at what time.
    2. I tried submitting a "1-Click Season Pass" using a date in the past (2010-09-20), but that resulted in a failure message from tivo.com, with the reason "There are no episodes available for <DVR name> in the next 14 days".
     
  12. Sep 26, 2010 #12 of 182
    reneg

    reneg Member

    699
    0
    Jun 19, 2002
    I like what I see so far. It's a shame you have to scrape web pages to get the data instead of just being able to query the Tivo. Bad Tivo, Bad!

    If you're looking for input, here is my feedback:
    1) I'd like to be able to exclude (or only include certain) Tivos. I only care about the todo lists on two of the four Tivos in the household.
    2) Appears to be an ordering issue with shows starting at 12:XX PM .
    Code:
    ['09/26', 'Sun', ' 9:00', 'pm', '  Family Room   ', '         Mad Men         ']
    ['09/26', 'Sun', '11:03', 'pm', '  Family Room   ', '         Rubicon         ']
    ['09/26', 'Sun', '12:00', 'pm', '  Family Room   ', '      NASCAR Racing      ']
    ['09/26', 'Sun', '12:00', 'pm', '  Family Room   ', '       NFL Football      ']
    3) Increase import friendliness by removing brackets, and leading & trailing white space within quoted text. My inclination was to import the first section into Excel, but the data required a lot of cleanup. As the program evolves and the output becomes better formatted, this may not be necessary.
    4) Didn't notice any ill effects on my Windows system
    Code:
    config_files = ['/etc/TiVoToDo.conf', os.path.join(p, 'TiVoToDo.conf')]
    
     
  13. Sep 26, 2010 #13 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Thank you!
    And agreed. Until an unhacked TiVo presents access to Season Passes (proper), WishLists, and/or To Do Lists, I'll use what I can! ;)

    Definitely a possibility. Adding an incl/excl section in the conf file should take care of that. I went with using the DVRs listed in the account because the ToDo list requests use the TSN and not the DVR name. But, I think having the name(s) in the conf file, I could reconcile the TSNs.

    Aw crap. I think this is fixable by converting the gathered ToDo list times to military time just before sending it off to be sorted. A convert back to civilian time after it's sorted should produce the correct order...

    Yeah, this should be easy. As it is now, I just print a "list" of right/left/center justified values. I'm thinking a command-line argument could indicate how to create output. For example, TiVoToDo.py "csv" would create an Excel friendly, unjustified TiVoToDo.csv file, and TiVoToDo.py <no argument> or TiVoToDo.py "display" would output to the command line as it does now.

    I plagiarized some of William's pyTivo code to get this script to work, and left that part in there to make it platform independent. If *nix users want to put the conf file in /etc, this will support that too.


    Is the verbosity ok? Did you wonder what was going on as it was running? I had some additional output code written in as I was testing, but pulled it out for the final result. Maybe I pulled out too much?
     
  14. Sep 26, 2010 #14 of 182
    txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    Wow! This is very cool. I am very interested in a way to output this to a csv file or something like that to be able to manipulate in excel. I have actually just purchased a Premiere and plan to replace my my unit with it (or at least supercede it). It would be excellent to be able to use this to redo the season passes.
     
  15. Sep 26, 2010 #15 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Yeah, the https://www3.tivo.com/tivo-tco/1clickseason.do?offerId=tivo:<some value>.<channel>.<provider type>.<date>&tsn=<TiVo TSN> links would make VERY quick work of creating Season Passes on a new box from an existing To Do list!

    Edit: Given the failure message received from TiVo when I tried to create a Season Pass using a past date, I wonder if the date is arbitrary in the link being passed, as long as it's within the two-week period that the Guide Data sees. Something new to test! The "That 70's Show" isn't a good test case, since it's repeated nightly in syndication for me. I'll look for a new series to play with...

    Re: Edit: Fail. Kind of. I tried scheduling "Outsourced" using a different date and time. The Season Pass was created, but for the 11:00 News, which I'm sure coincides with the date and time I passed along. So it appears that the "offerId" value doesn't explicitly contain a show's Id, but uses the channel, provider, date and time as the target for the Season Pass.
     
  16. Sep 26, 2010 #16 of 182
    SeanC

    SeanC ECT

    9,613
    5
    Dec 30, 2003
    Someplace
    Hmmmm, tried to use it, the python window pops up, all I get is:


    Press Enter when ready to see dates.



    Press Enter to exit

    Any idea what the problem could be?
     
  17. Sep 26, 2010 #17 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    TiVoToDo.conf is populated and found in the same folder as TiVoToDo.py?

    Sample TiVoToDo.conf:
    Code:
    [email]
    email = your.email@your.email.provider
    
    [password]
    password = supersecretpassword
    
    email is the email address used to login to tivo.com's website.
    password is the password to the site.
     
  18. Sep 26, 2010 #18 of 182
    SeanC

    SeanC ECT

    9,613
    5
    Dec 30, 2003
    Someplace
    Yeah, just double and triple checked that the files are named correctly, in the same folder (new folder on the desktop), and the username and pass are the same as on the Tivo.com website.
     
  19. Sep 26, 2010 #19 of 182
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Do you have Series 3 or greater TiVos? Series2 and less aren't supported on the TiVo To Do List pages at tivo.com.

    And also, if you are participating in a Beta Project (NTTABPs ;)), I can provide an alternate link to access those To Do pages.
     
  20. Sep 26, 2010 #20 of 182
    SeanC

    SeanC ECT

    9,613
    5
    Dec 30, 2003
    Someplace
    One active S3 and I'm not in a tivo beta.

    Without having an error message from the python window, tough to know whats happening in there, but yeah, it does seem to be username/password related because no matter what I put in for U/P the script does the same thing.
     

Share This Page