BT Sport Solved

Error Message: Your account does not have broadband:
Try this it worked for me.
Log into my BT account - choose to update account details. Make sure that your current telephone number is listed. Mine was blank, once I inserted the number I was able to go to the order page for BT Sports (Free Order)which is now working on my Laptop and Tablets. Hope this helps.
Solved!
Go to Solution.

Did you find where to enter your phone number? Did you enter it? (This worked for me).
Otherwise what does "not working for me" actually mean? Are you having the same problem as this thread talks about, or a different problem?
Thanks
Ian
http://www.siteguru.co.uk/be/ADSL2PlusForDummies.pdf - Having ADSL issues? Then read this PDF
Please don't click the star beside my name - too many stars makes you look like a swot!

Similar Messages

  • Cancelling BT Youview is it easy to switch Sport t...

    I'm cancelling my BT Youview subscription as if issues with internet then I can't watch anything via the subscription, so decided to move back to Sky for TV as get wider choice of content to watch plus get the Sky Movies in HD as well.
    But how easy is it to move my BT Sport to come through my Sky TV box as when try online it says 'Sorry you already have free BT Sports'
    Solved!
    Go to Solution.

    Confused walker . Are you staying with BT for broadband?
    If so you can do nothing until they switch off the service on BTTV.
    Once that's done trying to order it online will result in failure.
    You have to phone the number on the screen to get access on Sky. Why? Because in order to get you have to enter a new 12 month BB contract,
    SD is of course free but they want £3 a month for HD.
    I opted for SD only and the service became active while I was still on the phone. I later upgraded to HD online, it was painless and Lve as soon as I pressed submit.
    Life | 1967 Plus Radio | 1000 Classical Hits | Kafka's World
    Someone Solved Your Question?
    Please let other members know by clicking on ’Mark as Accepted Solution’
    Helpful Post?
    If a post has been helpful, say thanks by clicking the ratings star.

  • I've purchased and installed pages but when i try saving, printing and sporting documents I get a message saying that my 30-day trial has expired. What can I do to solve this problem?

    At first my pages was working fine after I installed it, but just recently it won't let me print, save or export my documents. I went back to the aaplication store and it shows that pages has been installed. I have no idea what to do next.

    You need to totally delete the demo version files then reinstall your registered version.
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=105&mforum=iworktips ntrick
    Peter

  • [SOLVED] tv_grab_nl_py works with python 2.6.5, fails on 3.1.2

    Hi All,
    I have updated my mediacenter. Now tv_grab_nl_py does not work anymore:
    [cedric@tv ~]$ tv_grab_nl_py --output ~/listings.xml --fast
    File "/usr/bin/tv_grab_nl_py", line 341
    print 'tv_grab_nl_py: A grabber that grabs tvguide data from tvgids.nl\n'
    ^
    SyntaxError: invalid syntax
    [cedric@tv ~]$
    the version of python on the mediacenter (running arch linux):
    [cedric@tv ~]$ python
    Python 3.1.2 (r312:79147, Oct 4 2010, 12:35:40)
    [GCC 4.5.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    I have copied the file to my laptop, there it looks like it's working:
    ./tv_grab_nl_py --output ~/listings.xml --fast
    Config file /home/cedric/.xmltv/tv_grab_nl_py.conf not found.
    Re-run me with the --configure flag.
    cedric@laptop:~$
    the version of python on my laptop (running arch linux):
    cedric@laptop:~$ python
    Python 2.6.5 (r265:79063, Apr 1 2010, 05:22:20)
    [GCC 4.4.3 20100316 (prerelease)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    the script I'm trying to run:
    [cedric@tv ~]$ cat tv_grab_nl_py
    #!/usr/bin/env python
    # $LastChangedDate: 2009-11-14 10:06:41 +0100 (Sat, 14 Nov 2009) $
    # $Rev: 104 $
    # $Author: pauldebruin $
    SYNOPSIS
    tv_grab_nl_py is a python script that trawls tvgids.nl for TV
    programming information and outputs it in XMLTV-formatted output (see
    http://membled.com/work/apps/xmltv). Users of MythTV
    (http://www.mythtv.org) will appreciate the output generated by this
    grabber, because it fills the category fields, i.e. colors in the EPG,
    and has logos for most channels automagically available. Check the
    website below for screenshots. The newest version of this script can be
    found here:
    http://code.google.com/p/tvgrabnlpy/
    USAGE
    Check the web site above and/or run script with --help and start from there
    HISTORY
    tv_grab_nl_py used to be called tv_grab_nl_pdb, first released on
    2003/07/09. The name change was necessary because more and more people
    are actively contributing to this script and I always disliked using my
    initials (I was just too lazy to change it). At the same time I switched
    from using CVS to SVN and as a result the version numbering scheme has
    changed. The lastest official release of tv_grab_nl_pdb is 0.48. The
    first official release of tv_grab_nl_py is 6.
    QUESTIONS
    Questions (and patches) are welcome at: paul at pwdebruin dot net.
    IMPORTANT NOTES
    If you were using tv_grab_nl from the XMLTV bundle then enable the
    compat flag or use the --compat command-line option. Otherwise, the
    xmltvid's are wrong and you will not see any new data in MythTV.
    CONTRIBUTORS
    Main author: Paul de Bruin (paul at pwdebruin dot net)
    Michel van der Laan made available his extensive collection of
    high-quality logos that is used by this script.
    Michael Heus has taken the effort to further enhance this script so that
    it now also includes:
    - Credit info: directors, actors, presenters and writers
    - removal of programs that are actually just groupings/broadcasters
    (e.g. "KETNET", "Wild Friday", "Z@pp")
    - Star-rating for programs tipped by tvgids.nl
    - Black&White, Stereo and URL info
    - Better detection of Movies
    - and much, much more...
    Several other people have provided feedback and patches (these are the
    people I could find in my email archive, if you are missing from this
    list let me know):
    Huub Bouma, Roy van der Kuil, Remco Rotteveel, Mark Wormgoor, Dennis van
    Onselen, Hugo van der Kooij, Han Holl, Ian Mcdonald, Udo van den Heuvel.
    # Modules we need
    import re, urllib2, getopt, sys
    import time, random
    import htmlentitydefs, os, os.path, pickle
    from string import replace, split, strip
    from threading import Thread
    from xml.sax import saxutils
    # Extra check for the datetime module
    try:
    import datetime
    except:
    sys.stderr.write('This script needs the datetime module that was introduced in Python version 2.3.\n')
    sys.stderr.write('You are running:\n')
    sys.stderr.write('%s\n' % sys.version)
    sys.exit(1)
    # XXX: fix to prevent crashes in Snow Leopard [Robert Klep]
    if sys.platform == 'darwin' and sys.version_info[:3] == (2, 6, 1):
    try:
    urllib2.urlopen('http://localhost.localdomain')
    except:
    pass
    # do extra debug stuff
    debug = 1
    try:
    import redirect
    except:
    debug = 0
    pass
    # globals
    # compile only one time
    r_entity = re.compile(r'&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z]+);')
    tvgids = 'http://www.tvgids.nl/'
    uitgebreid_zoeken = tvgids + 'zoeken/'
    # how many seconds to wait before we timeout on a
    # url fetch, 10 seconds seems reasonable
    global_timeout = 10
    # Wait a random number of seconds between each page fetch.
    # We want to be nice and not hammer tvgids.nl (these are the
    # friendly people that provide our data...).
    # Also, it appears tvgids.nl throttles its output.
    # So there, there is not point in lowering these numbers, if you
    # are in a hurry, use the (default) fast mode.
    nice_time = [1, 2]
    # Maximum length in minutes of gaps/overlaps between programs to correct
    max_overlap = 10
    # Strategy to use for correcting overlapping prgramming:
    # 'average' = use average of stop and start of next program
    # 'stop' = keep stop time of current program and adjust start time of next program accordingly
    # 'start' = keep start time of next program and adjust stop of current program accordingly
    # 'none' = do not use any strategy and see what happens
    overlap_strategy = 'average'
    # Experimental strategy for clumping overlapping programming, all programs that overlap more
    # than max_overlap minutes, but less than the length of the shortest program are clumped
    # together. Highly experimental and disabled for now.
    do_clump = False
    # Create a category translation dictionary
    # Look in mythtv/themes/blue/ui.xml for all category names
    # The keys are the categories used by tvgids.nl (lowercase please)
    cattrans = { 'amusement' : 'Talk',
    'animatie' : 'Animated',
    'comedy' : 'Comedy',
    'documentaire' : 'Documentary',
    'educatief' : 'Educational',
    'erotiek' : 'Adult',
    'film' : 'Film',
    'muziek' : 'Art/Music',
    'informatief' : 'Educational',
    'jeugd' : 'Children',
    'kunst/cultuur' : 'Arts/Culture',
    'misdaad' : 'Crime/Mystery',
    'muziek' : 'Music',
    'natuur' : 'Science/Nature',
    'nieuws/actualiteiten' : 'News',
    'overige' : 'Unknown',
    'religieus' : 'Religion',
    'serie/soap' : 'Drama',
    'sport' : 'Sports',
    'theater' : 'Arts/Culture',
    'wetenschap' : 'Science/Nature'}
    # Create a role translation dictionary for the xmltv credits part
    # The keys are the roles used by tvgids.nl (lowercase please)
    roletrans = {'regie' : 'director',
    'acteurs' : 'actor',
    'presentatie' : 'presenter',
    'scenario' : 'writer'}
    # We have two sources of logos, the first provides the nice ones, but is not
    # complete. We use the tvgids logos to fill the missing bits.
    logo_provider = [ 'http://visualisation.tudelft.nl/~paul/logos/gif/64x64/',
    'http://static.tvgids.nl/gfx/zenders/' ]
    logo_names = {
    1 : [0, 'ned1'],
    2 : [0, 'ned2'],
    3 : [0, 'ned3'],
    4 : [0, 'rtl4'],
    5 : [0, 'een'],
    6 : [0, 'canvas_color'],
    7 : [0, 'bbc1'],
    8 : [0, 'bbc2'],
    9 : [0,'ard'],
    10 : [0,'zdf'],
    11 : [1, 'rtl'],
    12 : [0, 'wdr'],
    13 : [1, 'ndr'],
    14 : [1, 'srsudwest'],
    15 : [1, 'rtbf1'],
    16 : [1, 'rtbf2'],
    17 : [0, 'tv5'],
    18 : [0, 'ngc'],
    19 : [1, 'eurosport'],
    20 : [1, 'tcm'],
    21 : [1, 'cartoonnetwork'],
    24 : [0, 'canal+red'],
    25 : [0, 'mtv-color'],
    26 : [0, 'cnn'],
    27 : [0, 'rai'],
    28 : [1, 'sat1'],
    29 : [0, 'discover-spacey'],
    31 : [0, 'rtl5'],
    32 : [1, 'trt'],
    34 : [0, 'veronica'],
    35 : [0, 'tmf'],
    36 : [0, 'sbs6'],
    37 : [0, 'net5'],
    38 : [1, 'arte'],
    39 : [0, 'canal+blue'],
    40 : [0, 'at5'],
    46 : [0, 'rtl7'],
    49 : [1, 'vtm'],
    50 : [1, '3sat'],
    58 : [1, 'pro7'],
    59 : [1, 'kanaal2'],
    60 : [1, 'vt4'],
    65 : [0, 'animal-planet'],
    73 : [1, 'mezzo'],
    86 : [0, 'bbc-world'],
    87 : [1, 'tve'],
    89 : [1, 'nick'],
    90 : [1, 'bvn'],
    91 : [0, 'comedy_central'],
    92 : [0, 'rtl8'],
    99 : [1, 'sport1_1'],
    100 : [0, 'rtvu'],
    101 : [0, 'tvwest'],
    102 : [0, 'tvrijnmond'],
    103 : [1, 'tvnoordholland'],
    104 : [1, 'bbcprime'],
    105 : [1, 'spiceplatinum'],
    107 : [0, 'canal+yellow'],
    108 : [0, 'tvnoord'],
    109 : [0, 'omropfryslan'],
    114 : [0, 'omroepbrabant']}
    # A selection of user agents we will impersonate, in an attempt to be less
    # conspicuous to the tvgids.nl police.
    user_agents = [ 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',
    'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9',
    'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)',
    'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7',
    'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)',
    'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071105 Firefox/2.0.0.9',
    'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9',
    'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071022 Ubuntu/7.10 (gutsy) Firefox/2.0.0.8'
    # Work in progress, the idea is to cache program categories and
    # descriptions to eliminate a lot of page fetches from tvgids.nl
    # for programs that do not have interesting/changing descriptions
    class ProgramCache:
    A cache to hold program name and category info.
    TVgids stores the detail for each program on a separate URL with an
    (apparently unique) ID. This cache stores the fetched info with the ID.
    New fetches will use the cached info instead of doing an (expensive)
    page fetch.
    def __init__(self, filename=None):
    Create a new ProgramCache object, optionally from file
    # where we store our info
    self.filename = filename
    if filename == None:
    self.pdict = {}
    else:
    if os.path.isfile(filename):
    self.load(filename)
    else:
    self.pdict = {}
    def load(self, filename):
    Loads a pickled cache dict from file
    try:
    self.pdict = pickle.load(open(filename,'r'))
    except:
    sys.stderr.write('Error loading cache file: %s (possibly corrupt)' % filename)
    sys.exit(2)
    def dump(self, filename):
    Dumps a pickled cache, and makes sure it is valid
    if os.access(filename, os.F_OK):
    try:
    os.remove(filename)
    except:
    sys.stderr.write('Cannot remove %s, check permissions' % filename)
    pickle.dump(self.pdict, open(filename+'.tmp', 'w'))
    os.rename(filename+'.tmp', filename)
    def query(self, program_id):
    Updates/gets/whatever.
    try:
    return self.pdict[program_id]
    except:
    return None
    def add(self, program):
    Adds a program
    self.pdict[program['ID']] = program
    def clear(self):
    Clears the cache (i.e. empties it)
    self.pdict = {}
    def clean(self):
    Removes all cached programming before today.
    Also removes erroneously cached programming.
    now = time.localtime()
    dnow = datetime.datetime(now[0],now[1],now[2])
    for key in self.pdict.keys():
    try:
    if self.pdict[key]['stop-time'] < dnow or self.pdict[key]['name'].lower() == 'onbekend':
    del self.pdict[key]
    except:
    pass
    def usage():
    print 'tv_grab_nl_py: A grabber that grabs tvguide data from tvgids.nl\n'
    print 'and stores it in XMLTV-combatible format.\n'
    print 'Usage:'
    print '--help, -h = print this info'
    print '--configure = create configfile (overwrites existing file)'
    print '--config-file = name of the configuration file (default = ~/.xmltv/tv_grab_py.conf'
    print '--capabilities = xmltv required option'
    print '--desc-length = maximum allowed length of programme descriptions in bytes.'
    print '--description = prints a short description of the grabber'
    print '--output = file where to put the output'
    print '--days = # number of days to grab'
    print '--preferredmethod = returns the preferred method to be called'
    print '--fast = do not grab descriptions of programming'
    print '--slow = grab descriptions of programming'
    print '--quiet = suppress all output'
    print '--compat = append tvgids.nl to the xmltv id (use this if you were using tv_grab_nl)'
    print '--logos 0/1 = insert urls to channel icons (mythfilldatabase will then use these)'
    print '--nocattrans = do not translate the grabbed genres into MythTV-genres'
    print '--cache = cache descriptions and use the file to store'
    print '--clean_cache = clean the cache file before fetching'
    print '--clear_cache = empties the cache file before fetching data'
    print '--slowdays = grab slowdays initial days and the rest in fast mode'
    print '--max_overlap = maximum length of overlap between programming to correct [minutes]'
    print '--overlap_strategy = what strategy to use to correct overlaps (check top of source code)'
    def filter_line_identity(m, defs=htmlentitydefs.entitydefs):
    # callback: translate one entity to its ISO Latin value
    k = m.group(1)
    if k.startswith("#") and k[1:] in xrange(256):
    return chr(int(k[1:]))
    try:
    return defs[k]
    except KeyError:
    return m.group(0) # use as is
    def filter_line(s):
    Removes unwanted stuff in strings (adapted from tv_grab_be)
    # do the latin1 stuff
    s = r_entity.sub(filter_line_identity, s)
    s = replace(s,'&nbsp;',' ')
    # Ik vermoed dat de volgende drie regels overbodig zijn, maar ze doen
    # niet veel kwaad -- Han Holl
    s = replace(s,'\r',' ')
    x = re.compile('(<.*?>)') # Udo
    s = x.sub('', s) #Udo
    s = replace(s, '~Q', "'")
    s = replace(s, '~R', "'")
    # Hmm, not sure if I understand this. Without it, mythfilldatabase barfs
    # on program names like "Steinbrecher &..."
    # We most create valid XML -- Han Holl
    s = saxutils.escape(s)
    return s
    def calc_timezone(t):
    Takes a time from tvgids.nl and formats it with all the required
    timezone conversions.
    in: '20050429075000'
    out:'20050429075000 (CET|CEST)'
    Until I have figured out how to correctly do timezoning in python this method
    will bork if you are not in a zone that has the same DST rules as 'Europe/Amsterdam'.
    year = int(t[0:4])
    month = int(t[4:6])
    day = int(t[6:8])
    hour = int(t[8:10])
    minute = int(t[10:12])
    #td = {'CET': '+0100', 'CEST': '+0200'}
    #td = {'CET': '+0100', 'CEST': '+0200', 'W. Europe Standard Time' : '+0100', 'West-Europa (standaardtijd)' : '+0100'}
    td = {0 : '+0100', 1 : '+0200'}
    pt = time.mktime((year,month,day,hour,minute,0,0,0,-1))
    timezone=''
    try:
    #timezone = time.tzname[(time.localtime(pt))[-1]]
    timezone = (time.localtime(pt))[-1]
    except:
    sys.stderr.write('Cannot convert time to timezone')
    return t+' %s' % td[timezone]
    def format_timezone(td):
    Given a datetime object, returns a string in XMLTV format
    tstr = td.strftime('%Y%m%d%H%M00')
    return calc_timezone(tstr)
    def get_page_internal(url, quiet=0):
    Retrieves the url and returns a string with the contents.
    Optionally, returns None if processing takes longer than
    the specified number of timeout seconds.
    txtdata = None
    txtheaders = {'Keep-Alive' : '300',
    'User-Agent' : user_agents[random.randint(0, len(user_agents)-1)] }
    try:
    #fp = urllib2.urlopen(url)
    rurl = urllib2.Request(url, txtdata, txtheaders)
    fp = urllib2.urlopen(rurl)
    lines = fp.readlines()
    page = "".join(lines)
    return page
    except:
    if not quiet:
    sys.stderr.write('Cannot open url: %s\n' % url)
    return None
    class FetchURL(Thread):
    A simple thread to fetch a url with a timeout
    def __init__ (self, url, quiet=0):
    Thread.__init__(self)
    self.quiet = quiet
    self.url = url
    self.result = None
    def run(self):
    self.result = get_page_internal(self.url, self.quiet)
    def get_page(url, quiet=0):
    Wrapper around get_page_internal to catch the
    timeout exception
    try:
    fu = FetchURL(url, quiet)
    fu.start()
    fu.join(global_timeout)
    return fu.result
    except:
    if not quiet:
    sys.stderr.write('get_page timed out on (>%s s): %s\n' % (global_timeout, url))
    return None
    def get_channels(file, quiet=0):
    Get a list of all available channels and store these
    in a file.
    # store channels in a dict
    channels = {}
    # tvgids stores several instances of channels, we want to
    # find all the possibile channels
    channel_get = re.compile('<optgroup label=.*?>(.*?)</optgroup>', re.DOTALL)
    # this is how we will find a (number, channel) instance
    channel_re = re.compile('<option value="([0-9]+)" >(.*?)</option>', re.DOTALL)
    # this is where we will try to find our channel list
    total = get_page(uitgebreid_zoeken, quiet)
    if total == None:
    return
    # get a list of match objects of all the <select blah station>
    stations = channel_get.finditer(total)
    # and create a dict of number, channel_name pairs
    # we do this this way because several instances of the
    # channel list are stored in the url and not all of the
    # instances have all the channels, this way we get them all.
    for station in stations:
    m = channel_re.finditer(station.group(0))
    for p in m:
    try:
    a = int(p.group(1))
    b = filter_line(p.group(2))
    channels[a] = b
    except:
    sys.stderr.write('Oops, [%s,%s] does not look like a valid channel, skipping it...\n' % (p.group(1),p.group(2)))
    # sort on channel number (arbitrary but who cares)
    keys = channels.keys()
    keys.sort()
    # and create a file with the channels
    f = open(file,'w')
    for k in keys:
    f.write("%s %s\n" % (k, channels[k]))
    f.close()
    def get_channel_all_days(channel, days, quiet=0):
    Get all available days of programming for channel number
    The output is a list of programming in order where each row
    contains a dictionary with program information.
    now = datetime.datetime.now()
    programs = []
    # Tvgids shows programs per channel per day, so we loop over the number of days
    # we are required to grab
    for offset in range(0, days):
    channel_url = 'http://www.tvgids.nl/zoeken/?d=%i&z=%s' % (offset, channel)
    # For historic purposes, the old style url that gave us a full week in advance:
    # channel_url = 'http://www.tvgids.nl/zoeken/?trefwoord=Titel+of+trefwoord&interval=0&timeslot='+\
    # '&station=%s&periode=%i&genre=&order=0' % (channel,days-1)
    # Sniff, we miss you...
    if offset > 0:
    time.sleep(random.randint(nice_time[0], nice_time[1]))
    # get the raw programming for the day
    total = get_page(channel_url, quiet)
    if total == None:
    return programs
    # Setup a number of regexps
    # checktitle will match the title row in H2 tags of the daily overview page, e.g.
    # <h2>zondag 19 oktober 2008</h2>
    checktitle = re.compile('<h2>(.*?)</h2>',re.DOTALL)
    # getrow will locate each row with program details
    getrow = re.compile('<a href="/programma/(.*?)</a>',re.DOTALL)
    # parserow matches the required program info, with groups:
    # 1 = program ID
    # 2 = broadcast times
    # 3 = program name
    parserow = re.compile('(.*?)/.*<span class="time">(.*?)</span>.*<span class="title">(.*?)</span>', re.DOTALL)
    # normal begin and end times
    times = re.compile('([0-9]+:[0-9]+) - ([0-9]+:[0-9]+)?')
    # Get the day of month listed on the page as well as the expected date we are grabbing and compare these.
    # If these do not match, we skip parsing the programs on the page and issue a warning.
    #dayno = int(checkday.search(total).group(1))
    title = checktitle.search(total)
    if title:
    title = title.group(1)
    dayno = title.split()[1]
    else:
    sys.stderr.write('\nOops, there was a problem with page %s. Skipping it...\n' % (channel_url))
    continue
    expected = now + datetime.timedelta(days=offset)
    if (not dayno.isdigit() or int(dayno) != expected.day):
    sys.stderr.write('\nOops, did not expect page %s to list programs for "%s", skipping it...\n' % (channel_url,title))
    continue
    # and find relevant programming info
    allrows = getrow.finditer(total)
    for r in allrows:
    detail = parserow.search(r.group(1))
    if detail != None:
    # default times
    start_time = None
    stop_time = None
    # parse for begin and end times
    t = times.search(detail.group(2))
    if t != None:
    start_time = t.group(1)
    stop_time = t.group(2)
    program_url = 'http://www.tvgids.nl/programma/' + detail.group(1) + '/'
    program_name = detail.group(3)
    # store time, name and detail url in a dictionary
    tdict = {}
    tdict['start'] = start_time
    tdict['stop'] = stop_time
    tdict['name'] = program_name
    if tdict['name'] == '':
    tdict['name'] = 'onbekend'
    tdict['url'] = program_url
    tdict['ID'] = detail.group(1)
    tdict['offset'] = offset
    #Add star rating if tipped by tvgids.nl
    tdict['star-rating'] = '';
    if r.group(1).find('Tip') != -1:
    tdict['star-rating'] = '4/5'
    # and append the program to the list of programs
    programs.append(tdict)
    # done
    return programs
    def make_daytime(time_string, offset=0, cutoff='00:00', stoptime=False):
    Given a string '11:35' and an offset from today,
    return a datetime object. The cuttoff specifies the point where the
    new day starts.
    Examples:
    In [2]:make_daytime('11:34',0)
    Out[2]:datetime.datetime(2006, 8, 3, 11, 34)
    In [3]:make_daytime('11:34',1)
    Out[3]:datetime.datetime(2006, 8, 4, 11, 34)
    In [7]:make_daytime('11:34',0,'12:00')
    Out[7]:datetime.datetime(2006, 8, 4, 11, 34)
    In [4]:make_daytime('11:34',0,'11:34',False)
    Out[4]:datetime.datetime(2006, 8, 3, 11, 34)
    In [5]:make_daytime('11:34',0,'11:34',True)
    Out[5]:datetime.datetime(2006, 8, 4, 11, 34)
    h,m = [int(x) for x in time_string.split(':')];
    hm = int(time_string.replace(':',''))
    chm = int(cutoff.replace(':',''))
    # check for the cutoff, if the time is before the cutoff then
    # add a day
    extra_day = 0
    if (hm < chm) or (stoptime==True and hm == chm):
    extra_day = 1
    # and create a datetime object, DST is handled at a later point
    pt = time.localtime()
    dt = datetime.datetime(pt[0],pt[1],pt[2],h,m)
    dt = dt + datetime.timedelta(offset+extra_day)
    return dt
    def correct_times(programs, quiet=0):
    Parse a list of programs as generated by get_channel_all_days() and
    convert begin and end times to xmltv compatible times in datetime objects.
    if programs == []:
    return programs
    # the start time of programming for this day, times *before* this time are
    # assumed to be on the next day
    day_start_time = '06:00'
    # initialise using the start time of the first program on this day
    if programs[0]['start'] != None:
    day_start_time = programs[0]['start']
    for program in programs:
    if program['start'] == program['stop']:
    program['stop'] = None
    # convert the times
    if program['start'] != None:
    program['start-time'] = make_daytime(program['start'], program['offset'], day_start_time)
    else:
    program['start-time'] = None
    if program['stop'] != None:
    program['stop-time'] = make_daytime(program['stop'], program['offset'], day_start_time, stoptime=True)
    # extra correction, needed because the stop time of a program may be on the next day, after the
    # day cutoff. For example:
    # 06:00 - 23:40 Long Program
    # 23:40 - 00:10 Lala
    # 00:10 - 08:00 Wawa
    # This puts the end date of Wawa on the current, instead of the next day. There is no way to detect
    # this with a single cutoff in make_daytime. Therefore, check if there is a day difference between
    # start and stop dates and correct if necessary.
    if program['start-time'] != None:
    # make two dates
    start = program['start-time']
    stop = program['stop-time']
    single_day = datetime.timedelta(1)
    startdate = datetime.datetime(start.year,start.month,start.day)
    stopdate = datetime.datetime(stop.year,stop.month,stop.day)
    if startdate - stopdate == single_day:
    program['stop-time'] = program['stop-time'] + single_day
    else:
    program['stop-time'] = None
    def parse_programs(programs, offset=0, quiet=0):
    Parse a list of programs as generated by get_channel_all_days() and
    convert begin and end times to xmltv compatible times.
    # good programs
    good_programs = []
    # calculate absolute start and stop times
    correct_times(programs, quiet)
    # next, correct for missing end time and copy over all good programming to the
    # good_programs list
    for i in range(len(programs)):
    # Try to correct missing end time by taking start time from next program on schedule
    if (programs[i]['stop-time'] == None and i < len(programs)-1):
    if not quiet:
    sys.stderr.write('Oops, "%s" has no end time. Trying to fix...\n' % programs[i]['name'])
    programs[i]['stop-time'] = programs[i+1]['start-time']
    # The common case: start and end times are present and are not
    # equal to each other (yes, this can happen)
    if programs[i]['start-time'] != None and \
    programs[i]['stop-time'] != None and \
    programs[i]['start-time'] != programs[i]['stop-time']:
    good_programs.append(programs[i])
    # Han Holl: try to exclude programs that stop before they begin
    for i in range(len(good_programs)-1,-1,-1):
    if good_programs[i]['stop-time'] <= good_programs[i]['start-time']:
    if not quiet:
    sys.stderr.write('Deleting invalid stop/start time: %s\n' % good_programs[i]['name'])
    del good_programs[i]
    # Try to exclude programs that only identify a group or broadcaster and have overlapping start/end times with
    # the actual programs
    for i in range(len(good_programs)-2,-1,-1):
    if good_programs[i]['start-time'] <= good_programs[i+1]['start-time'] and \
    good_programs[i]['stop-time'] >= good_programs[i+1]['stop-time']:
    if not quiet:
    sys.stderr.write('Deleting grouping/broadcaster: %s\n' % good_programs[i]['name'])
    del good_programs[i]
    for i in range(len(good_programs)-1):
    # PdB: Fix tvgids start-before-end x minute interval overlap. An overlap (positive or
    # negative) is halved and each half is assigned to the adjacent programmes. The maximum
    # overlap length between programming is set by the global variable 'max_overlap' and is
    # default 10 minutes. Examples:
    # Positive overlap (= overlap in programming):
    # 10:55 - 12:00 Lala
    # 11:55 - 12:20 Wawa
    # is transformed in:
    # 10:55 - 11.57 Lala
    # 11:57 - 12:20 Wawa
    # Negative overlap (= gap in programming):
    # 10:55 - 11:50 Lala
    # 12:00 - 12:20 Wawa
    # is transformed in:
    # 10:55 - 11.55 Lala
    # 11:55 - 12:20 Wawa
    stop = good_programs[i]['stop-time']
    start = good_programs[i+1]['start-time']
    dt = stop-start
    avg = start + dt / 2
    overlap = 24*60*60*dt.days + dt.seconds
    # check for the size of the overlap
    if 0 < abs(overlap) <= max_overlap*60:
    if not quiet:
    if overlap > 0:
    sys.stderr.write('"%s" and "%s" overlap %s minutes. Adjusting times.\n' % \
    (good_programs[i]['name'],good_programs[i+1]['name'],overlap / 60))
    else:
    sys.stderr.write('"%s" and "%s" have gap of %s minutes. Adjusting times.\n' % \
    (good_programs[i]['name'],good_programs[i+1]['name'],abs(overlap) / 60))
    # stop-time of previous program wins
    if overlap_strategy == 'stop':
    good_programs[i+1]['start-time'] = good_programs[i]['stop-time']
    # start-time of next program wins
    elif overlap_strategy == 'start':
    good_programs[i]['stop-time'] = good_programs[i+1]['start-time']
    # average the difference
    elif overlap_strategy == 'average':
    good_programs[i]['stop-time'] = avg
    good_programs[i+1]['start-time'] = avg
    # leave as is
    else:
    pass
    # Experimental strategy to make sure programming does not disappear. All programs that overlap more
    # than the maximum overlap length, but less than the shortest length of the two programs are
    # clumped.
    if do_clump:
    for i in range(len(good_programs)-1):
    stop = good_programs[i]['stop-time']
    start = good_programs[i+1]['start-time']
    dt = stop-start
    overlap = 24*60*60*dt.days + dt.seconds
    length0 = good_programs[i]['stop-time'] - good_programs[i]['start-time']
    length1 = good_programs[i+1]['stop-time'] - good_programs[i+1]['start-time']
    l0 = length0.days*24*60*60 + length0.seconds
    l1 = length1.days*24*60*60 + length0.seconds
    if abs(overlap) >= max_overlap*60 <= min(l0,l1)*60 and \
    not good_programs[i].has_key('clumpidx') and \
    not good_programs[i+1].has_key('clumpidx'):
    good_programs[i]['clumpidx'] = '0/2'
    good_programs[i+1]['clumpidx'] = '1/2'
    good_programs[i]['stop-time'] = good_programs[i+1]['stop-time']
    good_programs[i+1]['start-time'] = good_programs[i]['start-time']
    # done, nothing to see here, please move on
    return good_programs
    def get_descriptions(programs, program_cache=None, nocattrans=0, quiet=0, slowdays=0):
    Given a list of programs, from get_channel, retrieve program information
    # This regexp tries to find details such as Genre, Acteurs, Jaar van Premiere etc.
    detail = re.compile('<li>.*?<strong>(.*?):</strong>.*?<br />(.*?)</li>', re.DOTALL)
    # These regexps find the description area, the program type and descriptive text
    description = re.compile('<div class="description">.*?<div class="text"(.*?)<div class="clearer"></div>',re.DOTALL)
    descrtype = re.compile('<div class="type">(.*?)</div>',re.DOTALL)
    descrline = re.compile('<p>(.*?)</p>',re.DOTALL)
    # randomize detail requests
    nprograms = len(programs)
    fetch_order = range(0,nprograms)
    random.shuffle(fetch_order)
    counter = 0
    for i in fetch_order:
    counter += 1
    if programs[i]['offset'] >= slowdays:
    continue
    if not quiet:
    sys.stderr.write('\n(%3.0f%%) %s: %s ' % (100*float(counter)/float(nprograms), i, programs[i]['name']))
    # check the cache for this program's ID
    cached_program = program_cache.query(programs[i]['ID'])
    if (cached_program != None):
    if not quiet:
    sys.stderr.write(' [cached]')
    # copy the cached information, except the start/end times, rating and clumping,
    # these may have changed.
    tstart = programs[i]['start-time']
    tstop = programs[i]['stop-time']
    rating = programs[i]['star-rating']
    try:
    clump = programs[i]['clumpidx']
    except:
    clump = False
    programs[i] = cached_program
    programs[i]['start-time'] = tstart
    programs[i]['stop-time'] = tstop
    programs[i]['star-rating'] = rating
    if clump:
    programs[i]['clumpidx'] = clump
    continue
    else:
    # be nice to tvgids.nl
    time.sleep(random.randint(nice_time[0], nice_time[1]))
    # get the details page, and get all the detail nodes
    descriptions = ()
    details = ()
    try:
    if not quiet:
    sys.stderr.write(' [normal fetch]')
    total = get_page(programs[i]['url'])
    details = detail.finditer(total)
    descrspan = description.search(total);
    descriptions = descrline.finditer(descrspan.group(1))
    except:
    # if we cannot find the description page,
    # go to next in the loop
    if not quiet:
    sys.stderr.write(' [fetch failed or timed out]')
    continue
    # define containers
    programs[i]['credits'] = {}
    programs[i]['video'] = {}
    # now parse the details
    line_nr = 1;
    # First, we try to find the program type in the description section.
    # Note that this is not the same as the generic genres (these are searched later on), but a more descriptive one like "Culinair programma"
    # If present, we store this as first part of the regular description:
    programs[i]['detail1'] = descrtype.search(descrspan.group(1)).group(1).capitalize()
    if programs[i]['detail1'] != '':
    line_nr = line_nr + 1
    # Secondly, we add one or more lines of the program description that are present.
    for descript in descriptions:
    d_str = 'detail' + str(line_nr)
    programs[i][d_str] = descript.group(1)
    # Remove sponsored link from description if present.
    sponsor_pos = programs[i][d_str].rfind('<i>Gesponsorde link:</i>')
    if sponsor_pos > 0:
    programs[i][d_str] = programs[i][d_str][0:sponsor_pos]
    programs[i][d_str] = filter_line(programs[i][d_str]).strip()
    line_nr = line_nr + 1
    # Finally, we check out all program details. These are generically denoted as:
    # <li><strong>(TYPE):</strong><br />(CONTENT)</li>
    # Some examples:
    # <li><strong>Genre:</strong><br />16 oktober 2008</li>
    # <li><strong>Genre:</strong><br />Amusement</li>
    for d in details:
    type = d.group(1).strip().lower()
    content_asis = d.group(2).strip()
    content = filter_line(content_asis).strip()
    if content == '':
    continue
    elif type == 'genre':
    # Fix detection of movies based on description as tvgids.nl sometimes
    # categorises a movie as e.g. "Komedie", "Misdaadkomedie", "Detectivefilm".
    genre = content;
    if (programs[i]['detail1'].lower().find('film') != -1 \
    or programs[i]['detail1'].lower().find('komedie') != -1)\
    and programs[i]['detail1'].lower().find('tekenfilm') == -1 \
    and programs[i]['detail1'].lower().find('animatiekomedie') == -1 \
    and programs[i]['detail1'].lower().find('filmpje') == -1:
    genre = 'film'
    if nocattrans:
    programs[i]['genre'] = genre.title()
    else:
    try:
    programs[i]['genre'] = cattrans[genre.lower()]
    except:
    programs[i]['genre'] = ''
    # Parse persons and their roles for credit info
    elif roletrans.has_key(type):
    programs[i]['credits'][roletrans[type]] = []
    persons = content_asis.split(',');
    for name in persons:
    if name.find(':') != -1:
    name = name.split(':')[1]
    if name.find('-') != -1:
    name = name.split('-')[0]
    if name.find('e.a') != -1:
    name = name.split('e.a')[0]
    programs[i]['credits'][roletrans[type]].append(filter_line(name.strip()))
    elif type == 'bijzonderheden':
    if content.find('Breedbeeld') != -1:
    programs[i]['video']['breedbeeld'] = 1
    if content.find('Zwart') != -1:
    programs[i]['video']['blackwhite'] = 1
    if content.find('Teletekst') != -1:
    programs[i]['teletekst'] = 1
    if content.find('Stereo') != -1:
    programs[i]['stereo'] = 1
    elif type == 'url':
    programs[i]['infourl'] = content
    else:
    # In unmatched cases, we still add the parsed type and content to the program details.
    # Some of these will lead to xmltv output during the xmlefy_programs step
    programs[i][type] = content
    # do not cache programming that is unknown at the time
    # of fetching.
    if programs[i]['name'].lower() != 'onbekend':
    program_cache.add(programs[i])
    if not quiet:
    sys.stderr.write('\ndone...\n\n')
    # done
    def title_split(program):
    Some channels have the annoying habit of adding the subtitle to the title of a program.
    This function attempts to fix this, by splitting the name at a ': '.
    if (program.has_key('titel aflevering') and program['titel aflevering'] != '') \
    or (program.has_key('genre') and program['genre'].lower() in ['movies','film']):
    return
    colonpos = program['name'].rfind(': ')
    if colonpos > 0:
    program['titel aflevering'] = program['name'][colonpos+1:len(program['name'])].strip()
    program['name'] = program['name'][0:colonpos].strip()
    def xmlefy_programs(programs, channel, desc_len, compat=0, nocattrans=0):
    Given a list of programming (from get_channels())
    returns a string with the xml equivalent
    output = []
    for program in programs:
    clumpidx = ''
    try:
    if program.has_key('clumpidx'):
    clumpidx = 'clumpidx="'+program['clumpidx']+'"'
    except:
    print program
    output.append(' <programme start="%s" stop="%s" channel="%s%s" %s> \n' % \
    (format_timezone(program['start-time']), format_timezone(program['stop-time']),\
    channel, compat and '.tvgids.nl' or '', clumpidx))
    output.append(' <title lang="nl">%s</title>\n' % filter_line(program['name']))
    if program.has_key('titel aflevering') and program['titel aflevering'] != '':
    output.append(' <sub-title lang="nl">%s</sub-title>\n' % filter_line(program['titel aflevering']))
    desc = []
    for detail_row in ['detail1','detail2','detail3']:
    if program.has_key(detail_row) and not re.search('[Gg]een detailgegevens be(?:kend|schikbaar)', program[detail_row]):
    desc.append('%s ' % program[detail_row])
    if desc != []:
    # join and remove newlines from descriptions
    desc_line = "".join(desc).strip()
    desc_line.replace('\n', ' ')
    if len(desc_line) > desc_len:
    spacepos = desc_line[0:desc_len-3].rfind(' ')
    desc_line = desc_line[0:spacepos] + '...'
    output.append(' <desc lang="nl">%s</desc>\n' % desc_line)
    # Process credits section if present.
    # This will generate director/actor/presenter info.
    if program.has_key('credits') and program['credits'] != {}:
    output.append(' <credits>\n')
    for role in program['credits']:
    for name in program['credits'][role]:
    if name != '':
    output.append(' <%s>%s</%s>\n' % (role, name, role))
    output.append(' </credits>\n')
    if program.has_key('jaar van premiere') and program['jaar van premiere'] != '':
    output.append(' <date>%s</date>\n' % program['jaar van premiere'])
    if program.has_key('genre') and program['genre'] != '':
    output.append(' <category')
    if nocattrans:
    output.append(' lang="nl"')
    output.append ('>%s</category>\n' % program['genre'])
    if program.has_key('infourl') and program['infourl'] != '':
    output.append(' <url>%s</url>\n' % program['infourl'])
    if program.has_key('aflevering') and program['aflevering'] != '':
    output.append(' <episode-num system="onscreen">%s</episode-num>\n' % filter_line(program['aflevering']))
    # Process video section if present
    if program.has_key('video') and program['video'] != {}:
    output.append(' <video>\n');
    if program['video'].has_key('breedbeeld'):
    output.append(' <aspect>16:9</aspect>\n')
    if program['video'].has_key('blackwhite'):
    output.append(' <colour>no</colour>\n')
    output.append(' </video>\n')
    if program.has_key('stereo'):
    output.append(' <audio><stereo>stereo</stereo></audio>\n')
    if program.has_key('teletekst'):
    output.append(' <subtitles type="teletext" />\n')
    # Set star-rating if applicable
    if program['star-rating'] != '':
    output.append(' <star-rating><value>%s</value></star-rating>\n' % program['star-rating'])
    output.append(' </programme>\n')
    return "".join(output)
    def main():
    # Parse command line options
    try:
    opts, args = getopt.getopt(sys.argv[1:], "h", ["help", "output=", "capabilities",
    "preferredmethod", "days=",
    "configure", "fast", "slow",
    "cache=", "clean_cache",
    "slowdays=","compat",
    "desc-length=","description",
    "nocattrans","config-file=",
    "max_overlap=", "overlap_strategy=",
    "clear_cache", "quiet","logos="])
    except getopt.GetoptError:
    usage()
    sys.exit(2)
    # DEFAULT OPTIONS - Edit if you know what you are doing
    # where the output goes
    output = None
    output_file = None
    # the total number of days to fetch
    days = 6
    # Fetch data in fast mode, i.e. do NOT grab all the detail information,
    # fast means fast, because as it then does not have to fetch a web page for each program
    # Default: fast=0
    fast = 0
    # number of days to fetch in slow mode. For example: --days 5 --slowdays 2, will
    # fetch the first two days in slow mode (with all the details) and the remaining three
    # days in fast mode.
    slowdays = 6
    # no output
    quiet = 0
    # insert url of channel logo into the xml data, this will be picked up by mythfilldatabase
    logos = 1
    # enable this option if you were using tv_grab_nl, it adjusts the generated
    # xmltvid's so that everything works.
    compat = 0
    # enable this option if you do not want the tvgids categories being translated into
    # MythTV-categories (genres)
    nocattrans = 0
    # Maximum number of characters to use for program description.
    # Different values may work better in different versions of MythTV.
    desc_len = 475
    # default configuration file locations
    hpath = ''
    if os.environ.has_key('HOME'):
    hpath = os.environ['HOME']
    # extra test for windows users
    elif os.environ.has_key('HOMEPATH'):
    hpath = os.environ['HOMEPATH']
    # hpath = ''
    xmltv_dir = hpath+'/.xmltv'
    program_cache_file = xmltv_dir+'/program_cache'
    config_file = xmltv_dir+'/tv_grab_nl_py.conf'
    # cache the detail information.
    program_cache = None
    clean_cache = 1
    clear_cache = 0
    # seed the random generator
    random.seed(time.time())
    for o, a in opts:
    if o in ("-h", "--help"):
    usage()
    sys.exit(1)
    if o == "--quiet":
    quiet = 1;
    if o == "--description":
    print "The Netherlands (tv_grab_nl_py $Rev: 104 $)"
    sys.exit(0)
    if o == "--capabilities":
    print "baseline"
    print "cache"
    print "manualconfig"
    print "preferredmethod"
    sys.exit(0)
    if o == '--preferredmethod':
    print 'allatonce'
    sys.exit(0)
    if o == '--desc-length':
    # Use the requested length for programme descriptions.
    desc_len = int(a)
    if not quiet:
    sys.stderr.write('Using description length: %d\n' % desc_len)
    for o, a in opts:
    if o == "--config-file":
    # use the provided name for configuration
    config_file = a
    if not quiet:
    sys.stderr.write('Using config file: %s\n' % config_file)
    for o, a in opts:
    if o == "--configure":
    # check for the ~.xmltv dir
    if not os.path.exists(xmltv_dir):
    if not quiet:
    sys.stderr.write('You do not have the ~/.xmltv directory,')
    sys.stderr.write('I am going to make a shiny new one for you...')
    os.mkdir(xmltv_dir)
    if not quiet:
    sys.stderr.write('Creating config file: %s\n' % config_file)
    get_channels(config_file)
    sys.exit(0)
    if o == "--days":
    # limit days to maximum supported by tvgids.nl
    days = min(int(a),6)
    if o == "--compat":
    compat = 1
    if o == "--nocattrans":
    nocattrans = 1
    if o == "--fast":
    fast = 1
    if o == "--output":
    output_file = a
    try:
    output = open(output_file,'w')
    # and redirect output
    if debug:
    debug_file = open('/tmp/kaas.xml','w')
    blah = redirect.Tee(output, debug_file)
    sys.stdout = blah
    else:
    sys.stdout = output
    except:
    if not quiet:
    sys.stderr.write('Cannot write to outputfile: %s\n' % output_file)
    sys.exit(2)
    if o == "--slowdays":
    # limit slowdays to maximum supported by tvgids.nl
    slowdays = min(int(a),6)
    # slowdays implies fast == 0
    fast = 0
    if o == "--logos":
    logos = int(a)
    if o == "--clean_cache":
    clean_cache = 1
    if o == "--clear_cache":
    clear_cache = 1
    if o == "--cache":
    program_cache_file = a
    if o == "--max_overlap":
    max_overlap = int(a)
    if o == "--overlap_strategy":
    overlap_strategy = a
    # get configfile if available
    try:
    f = open(config_file,'r')
    except:
    sys.stderr.write('Config file %s not found.\n' % config_file)
    sys.stderr.write('Re-run me with the --configure flag.\n')
    sys.exit(1)
    #check for cache
    program_cache = ProgramCache(program_cache_file)
    if clean_cache != 0:
    program_cache.clean()
    if clear_cache != 0:
    program_cache.clear()
    # Go!
    channels = {}
    # Read the channel stuff
    for blah in f.readlines():
    blah = blah.lstrip()
    blah = blah.replace('\n','')
    if blah:
    if blah[0] != '#':
    channel = blah.split()
    channels[channel[0]] = " ".join(channel[1:])
    # channels are now in channels dict keyed on channel id
    # print header stuff
    print '<?xml version="1.0" encoding="ISO-8859-1"?>'
    print '<!DOCTYPE tv SYSTEM "xmltv.dtd">'
    print '<tv generator-info-name="tv_grab_nl_py $Rev: 104 $">'
    # first do the channel info
    for key in channels.keys():
    print ' <channel id="%s%s">' % (key, compat and '.tvgids.nl' or '')
    print ' <display-name lang="nl">%s</display-name>' % channels[key]
    if (logos):
    ikey = int(key)
    if logo_names.has_key(ikey):
    full_logo_url = logo_provider[logo_names[ikey][0]]+logo_names[ikey][1]+'.gif'
    print ' <icon src="%s" />' % full_logo_url
    print ' </channel>'
    num_chans = len(channels.keys())
    channel_cnt = 0
    if program_cache != None:
    program_cache.clean()
    fluffy = channels.keys()
    nfluffy = len(fluffy)
    for id in fluffy:
    channel_cnt += 1
    if not quiet:
    sys.stderr.write('\n\nNow fetching %s(xmltvid=%s%s) (channel %s of %s)\n' % \
    (channels[id], id, (compat and '.tvgids.nl' or ''), channel_cnt, nfluffy))
    info = get_channel_all_days(id, days, quiet)
    blah = parse_programs(info, None, quiet)
    # fetch descriptions
    if not fast:
    get_descriptions(blah, program_cache, nocattrans, quiet, slowdays)
    # Split titles with colon in it
    # Note: this only takes place if all days retrieved are also grabbed with details (slowdays=days)
    # otherwise this function might change some titles after a few grabs and thus may result in
    # loss of programmed recordings for these programs.
    if slowdays == days:
    for program in blah:
    title_split(program)
    print xmlefy_programs(blah, id, desc_len, compat, nocattrans)
    # save the cache after each channel fetch
    if program_cache != None:
    program_cache.dump(program_cache_file)
    # be nice to tvgids.nl
    time.sleep(random.randint(nice_time[0], nice_time[1]))
    if program_cache != None:
    program_cache.dump(program_cache_file)
    # print footer stuff
    print "</tv>"
    # close the outputfile if necessary
    if output != None:
    output.close()
    # and return success
    sys.exit(0)
    # allow this to be a module
    if __name__ == '__main__':
    main()
    # vim:tw=0:et:sw=4
    [cedric@tv ~]$
    Best regards,
    Cedric
    Last edited by cdwijs (2010-11-04 18:44:51)

    Running the script by python2 solves it for me:
    su - mythtv -c "nice -n 19 python2 /usr/bin/tv_grab_nl_py --output ~/listings.xml"
    Best regards,
    Cedric

  • Sky Sports 1 and 2 and BT in general - Absolutely ...

    I would like to start by stating this will be a bit of an essay but I hope anyone who opens this thread up takes the time and consideration to read and takes it on-board, I am particurlarly aiming that at prospective BT customers who may be here to consider taking up a contract with BT, I strongly urge you to NOT DO THIS and to use my experience as the leading reason why.
    We have been BT customers since we moved into our current property back in 2003, we have the current full package on offer, BT Infinity, with the Sky Sports and ESPN upgrades and the full On Demand and Broadband services. We have experienced numerous problems over the past three to four years with connectivity issues. The broadband drops in and out all the time, it's hard to put a level of consistency on this but on some days it can drop out 25-30 times, it can happen a lot at the weekend some weeks or weekdays on the others or both, the timing varies, it doesn't appear to be reflective of particurlar weather conditions, not that this should really matter anyway but we've been investigating all possible lines of enquiry as to why the problems keep happening, by my calculation we've had 18 engineers out to visit the property, I myself, and this does not include the other numerous phone calls made by fellow family members, have called and reported the problem to BT at least 50 times in this time period, I've taken days off work to wait for engineers, I've unplugged and reset my hub more times than I care to remember, we've had the hub itself replaced four times, the Vision box replaced twice, the lines re-routed through our house twice and more e-mails and letters than I reckon President Barack Obama sends in one year in office!
    And so far, to date, and I am talking about in the last five days, the problem still exists! The only way to get the connection back is to turn the hub off and back on again, or use the reset button, which we all know disrupts the hub and often results in further faults down the line, I would love to not have to do this but given we're paying for 24/7 internet access I should not have to sit around waiting, in most cases, up to 3-4 hours for the signal to return to the hub by itself (I know, I've timed it, something else I've wated much of my own time doing). The lights don't flash or change colour on the hub either when this problem occurs (the hub should register lack of connection, with the lights going from blue to either flashing blue or, in most cases, red, just for the record they stay blue but we have used various devices in this house ranging from state-of-the-art, brand-new laptops to tablets to i-phones to desktops and the problem occurs the same for everyone so before I get one of the many excuses I've already had from BT that it's a potential "device problem" you can forget that one, been there, done that!).
    I have urged, and urged, and urged the engineers, the people I speak to one the phone, the personal advisors our case has been passed on too, to look at potential problems outside our property i.e. the exchange. This has been rebuffed time and time again. "It's not the problem sir, the problem is here sir, the problem is not our fault sir" etc. etc. etc. Well, guess what....
    We've just received a phone call informing us that, from June 10th in our area, due to issues with the exchange being able to hold the signal, Sky Sports 1 and Sky Sports 2 will no longer be avaliable on our BT package. As huge cricket fans, from a personal perspective, first off, this is infuriating. The person we spoke too also claimed Sky have "pulled the plug" on the package so, also, I'm a little confused as too which is the actual issue here resulting in the loss of Sky Sports? That you've known all along that there has been problem in my local area with the exchange and the signal it can hold, or that Sky have pulled the rights to their sports package? Or perhaps that you spent £757 million recently on a new TV rights package for Premiership football for two new BT Sports channels (those ones you see currently advertised, on, of all channels, Sky Sports 1 and 2!) and actually are just quite happy to cut customers out who have lined your pockets with substantial monthly fees for programming you knew full well didn't work when you first signed contracts with Sky to pick it up, and then distributed to customers? Are you seriously telling me after, by my calculation, three years, you didn't know Sky Sports 1 and 2 didn't work in my local area, yet carried on debiting bank accounts, advertising the channels, supplying them and then, now, with less than a month's notice, you've pulled the plug? That takes me right back to the title of my message - absolutely disgraceful.
    I should make it clear at this point we have experienced problems with BT Vision too, albeit not lately, thank God, although that is not to say the problems wouldn't return. Signal dropping in and out, screen crackling and dropping out, black screens frequently on SS1, SS2 and ESPN etc. As for the On Demand service, that is obviously effected by the hub signal dropping in and out, the Vision box also does not appear to correlate with the hub when the signal returns and remains offline for a further amount of time, even when it is disconnected and then reconnected. It is constantly buffering too when the signal is low. Also, one other, far more minor point, you've been advertising 'red button coming soon' now for about three months!? I don't know what your definition of 'coming soon' is, but it's not the same as mine I can assure you, and I'm willing to bet quite a few others too!
    Can you give me a good reason why I shouldn't report you too Trading Standards for misleading and false advertising? For 3 years you've been selling us a Sky Sports package you know full well won't work properly in our local area, I don't blame you for Sky's monpoly on sport, but perhaps you can explain to me why you've given two answers that completely contradict each other to the future dealings with Sky Sports in our local area? Why have you not addressed the issues with the exchange for our connectivity problems, despite the fact your now claiming it is what is probably attributed to causing our issues with the two sports channels? Also, I have worked in customer service jobs and I know people wind the heck out of you on some days, but a significant portion of your "customer advisors" are rude and ignorant. You ring the freephone number, your on hold for half-a-century, you get put through to the call-centre in Bombay and you are treated with contempt, I actually feel sorry for the people who work out there, they are clearly reading from a script and lack in clear English Language skills, which is not their fault, it's yours. As for anyone who takes dispute with that, go and ask them a question next time like "how is your day?" They won't answer, they can't, it's not on their call sheet. The few I have dealt with who have clear use of the language are, as I said, rude and ignorant, often accusing me, quite clearly, of lying and of having not reported the problem, for me then to find out a later date when I speak to the technical deparment and to BT Openreach (and yes, I know they are two seperate companies) that date is not transferred correctly between the two which is why whoever you speak too in the call-centre usually only has a last referral point for you from some years ago, it's also quite clearly a deflection manouvre to keep you away from actually getting your problem resolved, paying Openreach to dispatch engineers if required and so you don't clog up the minimal amount of contactable phone numbers for the average customer that are based in the UK.
    Failure to receive a suitable and acceptable answer to my queries will result in me having no other option but to consider taking the matter further, I am also inclined now to make it my work between now and the date of June 10th to persuade everyone I know and they know to stay as far away from your company as possible and the "services" you claim to provide.
    Also, as huge cricket, and for that matter, NFL fans, maybe you should consider that many sports-viewers in this country aren't just about football. Yes I know that's where the money lies but there is profit to be made from other sports ventures too, I don't think you realize just how many fans you are leaving out in the cold over this move, the whole reason we, and we are just one example, subscribed to the Sky Sports package was for the cricket, and for the NFL. Two sports that are entirely monopolized by Sky, yes I realize, as I state earlier, that's not your fault, but why don't you show a bit of interest in them then? Why don't you be slightly different, you have over £700 million to spend on Premiership football but little else? If you want to attract more customers and build larger profit margins, you have to be more diverse and explore new options and directions to do this.
    I'm sure some will say, "why not get Sky?" Well unfortunately we can't due to our location but at least Sky were up-front and honest enough to tell us this when they first came to do a consultation, one, that by the way, we had as a secondary option to BT due to the attractions of the On Demand package, that then wasn't offered by Sky. How sad it's come too this and what an awful way to treat loyal customers who have upgraded to the packages you have offered in all innocence to obtain a better and more fruitful service? Customers who have never been late with payments either and used the likes of the Box office service for both movies and music (when the latter was chargable) as well, the money you have had off us, and that is what we've received in return and yet, perhaps, the poorest reflection on us, is we have stuck it for so long, but we are at the end of our tethers now and utterly furious at the decisions we've learned today that I am going to ensure we get to the bottom of this.
    Thank you for taking the time to read, what I appreciate, is a lengthy message. I didn't want to have to write this but it was the only way of making our problems and feelings clear, and I wanted to include everything so as not too mislead anyone myself.

    Sadly as this is customer to customer forum you are only talking to fellow customers.
    Perhaps it would be better to contact the Mods who are the only BT employees here,
    Life | 1967 Plus Radio | 1000 Classical Hits | Kafka's World
    Someone Solved Your Question?
    Please let other members know by clicking on ’Mark as Accepted Solution’
    Helpful Post?
    If a post has been helpful, say thanks by clicking the ratings star.

  • Lack of BT Sport Support - passed around for three...

    Hi All
    I have been activated as a BT Sport customer, so why won't it work on my system?  I registered a call to BT on Wednesday of this week, having made sure my card had been acivated, apparently though as an Infinity user I don't need a card for the Vision box.
    I have spent three evenings in queue after queue, spoken to numerous people all of whom promise to direct me to someone who can help, but no it goes back into yet another queue.  Now it is Saturday morning and the same is happening again, spoke to one person who gave advice to insert the card and type in the card number, where and how do I type in the number I asked?  Oh let me talk to someone more technical, bang I am back in another queue.
    I would like someone at BT to take ownership of customer calls and make sure there is some level of closure and not just phob us off.  We do pay good money for BT services, so lets get some support when we need it.
    If anyone knows a number I can call where I can talk to someone who actually cares and holds the responsibility to resolve the call please let me know.
    BT Sport is probably a good new and challenging service, so let me view it.
    TRL
    Solved!
    Go to Solution.

    What n_d has said is partially correct.
    If you have Infinity AND a Youview box you do not need a viewing card. If you have Infinity and a BT Vision box you will need a card.
    HOWEVER there is a problem in BT's system which flags to the BT Sports team that the viewing card needs to be activated for customers with the Youview box (even though don't have or need one). This has caused all sorts of problems as it stops the BT Sports team from being able to activate your BT Sports on TV subscription and the Technical Team won't update your software because you are not subscribed to watch on your TV.
    If this is your issue then you will be on a merry-go-round between the Sports Team and the Technical Helpdesk.
    Call the Customer Options Team on 0800 800 900 to establish what your problem is and they should be able sort to it out.
    Good luck!

  • Problem recording videos with Toshiba Camileo X-Sports

    Hi there,
    I recently just brought the Toshiba Camileo X-Sports so am fairly new to how the camera works.
    As the title suggests I am having some issues recording.
    Right I'll try and explain the best i can
    The reason I purchased this device was mainly to be used as a car safety cam (crash cam) as I'm a taxi driver, I drive around 200 miles per day and people's ability to drive sensibly is just getting crazy now and having video evidence if the worst should happen would be amazing. Other reasons was for trips out on my motorcycle and also being able to take this cam under water.
    I received the X-Sports on Wednesday, placed the memory card in and hit format card to ensure the card was correctly set for use with the X-Sports
    I then read through the manual to see what settings would suit my needs best... I came across looping video.
    Here's what the manual says.
    Looping Video
    Looping Video features recording a continuously looping video that overwrites itself until you stop it.
    Looping Video feature includes:
    OFF - Default
    Max - Depending on the maximum capacity the camera records a certain number of videos based on 15 minutes files, then deletes the first 15 minutes file to continue recording a new video.
    5 Min - Camera records 5 x 1 minute file, then deletes the first 1 minute file to continue recording a new video.
    20 Min - Camera records 4 x 5 minutes file, then deletes the first 5 minutes file to continue recording a new video.
    60 Min - Camera records 4 x 15 minutes file, then deletes the first 15 minutes file to continue recording a new video.
    120 Min - Camera records 8 x 15 minutes file, then deletes the first 15 minutes file to continue recording a new video.
    So upon reading this I though right as I have a 64gb card (Samsung EVO 64gb Class 10 U1 micro SDXC) I will put the setting on Max and then if ever I needed to recall a video i will have a decent chunk of the day stored on the memory card leading up to the event.
    I took the camera out with me on Thursday just for an hour and when i got home i took the memory card out and placed it into my laptop to view the recordings and this is where my problem comes in.
    The first 15min video plays back fine but every file after that will not play. when i open the memory card file the first video has the preview style thumb nail where as the rest of the video files do not.
    I then searched online and come across this website looking for answers.
    some of the info i read was that 1080 60fps was causing some problems with recording and playback and to turn down the fps to 30fps, also that the stability control was also a possibility for these issues.
    So last night i went through and made the necessary changes to my settings 1080 @ 30fps and no stability control. I then set the camera up in the living room for 45mins as a test. i then tested the recordings on my laptop and hey presto it worked. 3x 15min videos all playing back as they should Great stuff
    This morning at 5am i left for work taking my shiney new cam with me, happy in what i might capture on today's drive and also be satisfied that my camera is functioning as it should.
    I get home, stick the memory card into the laptop and I'm back to square one. my first 15mins was fine and all others were unable to playback. I also tried the memory card in my PC and still had the playback issues.
    Does anyone have any ideas or shall I return this as faulty?
    Sorry for the big post but wanted to put as much info as possible!
    Thanks, Leon.

    Problem Solved
    Camera returned and replaced with a Kitvision Edge HD30W

  • [Solved] Grub not displaying menu, error messages from grub-mkconfig

    Hi I'm new
    I have (or rather, am trying to setup) a dual boot with Windows 8.1 and Arch, with each OS on separate SSDs.
    Windows 8.1 already installed, Arch installation (seems to have) has gone smoothly. However, when I remove the installation usb, and try to boot, I get a command line prompt:
    grub >_
    ...instead of a menu. I tried typing 'boot', but got 'you need to load the kernel first'. So I cannot access my arch installation without chrooting (or knowing how to compile the kernel in the command line, which I could not find after a lot of searching)
    I followed the documentation in the Beginner's Guide and the GRUB page for installing and configuring GRUB. This is UEFI (grub2), not BIOS (grub legacy).
    pacman -S grub efibootmgr
    grub-install --target=x86S64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck
    No error messages. I also installed os-prober for kicks. When I went to generate the config file (as recommended for beginners), I got a torrent of what I interpreted to be error messages, not just copacetic output:
    grub-mkconfig -o /boot/grub/grub.cfg
    resulted in:
    click this link for error messages
    (sorry about the image. I had to shutdown and reboot into my windows partition, since I still can't arch it up. If any/all of you have a better way to reproduce output and feel it pertinent, I'm all ears)
    so upon exiting chroot and rebooting, grub boots up to the above effect; no menu is displayed. And I am sad panda.
    Background Information:
    Partition scheme:
    /dev/sda1 - BIOS boot partition (I didn't read carefully, lol)
    /dev/sda2 - EFI System Partition - mounted to /mnt/boot when chrooting in
    /dev/sda3 - Root partition - mounted to /mnt/ when chrooting in
    /dev/sda4 - Home partition - mounted to /mnt/home when chrooting in
    The installation and configuration described above was done in chroot with the above partition scheme
    I originally had issues booting into UEFI mode with the arch iso (written to a usb stick for the initial install). The boot would hang at 'triggering uevents'. I ultimately fixed this by pressing 'e' in the bootloader menu (also grub, I believe) and prepended
    linux /boot/vmlinux-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff nomodeset nouveau.modeset=0
    It then (successfully triggered uevents? and) booted normally
    ALSO:
    This is a custom built pc.
    Hardware:
    intel i7 4930K
    ASUS Sabertooth X79 mobo
    ASUS GTX 780 Ti gpu
    ballistix sport DDR3 RAM (4 x 8 GB)
    3 x 128 GB SSD (ADATA P900)
    1 x 2 TB HDD (Toshiba, 7200 rpm)
    Hey, if you made it to the bottom of this post, I really appreciate you taking the time out of your day. Thank you!
    Last edited by Otsdarva (2014-06-09 03:22:25)

    I realized that since I was not using EFISTUB, I could not mount the ESP to /boot; it had to be /boot/efi. A quick remount-reinstall of grub, then rerunning grub-mkconfig solved the issue.
    Also, regarding WonderWoofy's suggestion: I learned by trying gummiboot that for whatever reason the kernel hadn't compiled properly when I ran
    pacstrap /mnt base base-devel
    Fixed via
    pacman -S linux
    Thanks for your help, everybody!

  • Problem setting up Sky Sports

    Hi,
    Received a BT Vision Box yesterday with the Viewing Card for Sky Sports 1+2. Bt Vision TV is all working fine, and put the viewing card into the slot within half an hour of setting the tv up. Followed the instructions and waited for the hour on the sky sports 1 channel but still had the black screen saying "Please insert your viewing card..." Have searched on the forums for a solution but can't see any for this problem. Checked on bt.com to see if i could re-activate the card but it had already been activated so no problem there.
    Please help!!
    Solved!
    Go to Solution.

    Best suggestion is to phone up and get through to the technical team who will activate it. It is an automated process taking about 48 hours I believe
    Life | 1967 Plus Radio | 1000 Classical Hits | Kafka's World
    Someone Solved Your Question?
    Please let other members know by clicking on ’Mark as Accepted Solution’
    Helpful Post?
    If a post has been helpful, say thanks by clicking the ratings star.

  • Trouble with bt sport app

    Is anyone else having trouble opening bt sport app??
    Solved!
    Go to Solution.

    I cant get it to work on ipad or android. S5. Will not login
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Camileo X-sports - no thumbnail files using 1080p 60fps

    Hi everyone:
    I've recently bought the camileo x-sports. It's a nice camera but i found one problem with it:
    It is supposed that with every video or photo that it takes, it creates simultaneously anoher smaller sized file, named as "thm".
    The problem is that my x-sports does not create that file for videos in 1080p 60 fps, but it does for 30fps.
    Whats the problem with it?, i tried solving it updating the firmware, but it did not result.
    Thank you for your time.
    Enrique.

    The thm file extension means thumbnail image file and this is a quick snapshot of your video.
    Besides the original recorded video file (VID00001.mp4) a smaller sized video file (VID00001_thm.mp4) will be created during video recording.
    This file will be used for faster video content transfer with your WiFi APP from the camera to your tablet / smartphone device and further to upload your videos and photos to social networks with your WiFi APP.
    Obviously the snapshot isnt created due to the double frame rate and I guess this happens because the 60fps file is much bigger and probably 30fps videos file quality is good enough to watch it on your tablet / smartphone or for upload to social networks, etc

  • I believe my firefox is viewing some websites on my laptop in formats that are used for cellular devices. Sites like facebook, sports illustrated, yahoo are not functioning correctly but certain sites work fine.

    sits such as facebook, yahoo, and sports illustrated do not function correctly on firefox but they do on my internet explorer. I believes its somehow set itself into the same format used for cellular devices... My JSU.edu page says somethin about it being in (portal mode). It is also a different format now that normal.

    Hi @TheBigGiggle ,
    Thank you for visiting the HP Support Forums and Welcome. I have read your thread on your HP ENVY TouchSmart 17 Notebook PC and a keys not functioning correctly. Here is a document on cleaning the keyboard.
    I would start with air on the keys as sometimes debris can cause this issue.
    Here is a link to uninstall the keyboard. In the device manager have you uninstall all that is listed in keyboards, restart the computer after uninstalling, it should reinstall automatically and resolve any issues with the keyboard.
    Here is a link to keyboard troubleshooting.
    Here is a fix from Microsoft that might help.
    Let me know how this goes.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • No BT Sport HD

    Morning all.
    I have BT Broadband Infinity 2. My BT Sport was previously provided via my Sky+ box.
    My BT TV service (HD service) was activated on Thursday and I contacted BT to request my BT Sport service be provided via my Youview box.
    BT Sport in standard form is viewable but I have an on-screen message telling me I need to subscribe to receive BT Sport HD.  I've contacted BT tech support who passed me onto the order management department who said the matter would be resolved by 20:00 hrs yesterday.
    I still don't have BT Sport HD.
    Any suggestions how I resolve this problem.

    Edit: Apologies.  My problem has now been solved by a very helpful lady in Tech support 
    Solved!
    Go to Solution.

    Hi ceeaich,
    Have you managed to get BT Sport HD added? If not I'll be able to help. Please send me in your details using the "Contact The Mods" link found in my profile.
    Thanks
    PaddyB
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • No Multi-Room for BT Sport on Sky?

    I was wondering why BT Sports have no Multi-Room avaliable? I find it a constant disappointment because Someone may be watching something else on the one TV and I can't watch it on my other Sky box. Can you please create a Multi-Room where I can watch BT Sport on my two Sky Boxes? Many Thanks.
    Solved!
    Go to Solution.

    there are  umerous posts on the forum about this - if you have sky then this will help
    http://bt.custhelp.com/app/answers/detail/a_id/47857/kw/BT%20Sports%20on%20second%20sky%20box/c/6401...
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Watching bt sport using a sky + hd box

    Currently i have the bt broadband/phone /tv package with a vision + box recieving standard broadband as fibre is not yet available where i live.My question is this.........I have a sky + hd box from when i used to have sky(im no longer a sky customer) and i would like to know if i can watch bt sport through this sky box so i can watch the sport in hd quality rather than the patchy picture i get now through the ariel.I still have my old sky viewing card in the sky + box but would it still be active/recognised by sky?
    Solved!
    Go to Solution.

    You need to cancel sports on your box and then ask for it to be activated on Sky which will start a new contract. You need to do this by phone however as I found when I took this route,
    Life | 1967 Plus Radio | 1000 Classical Hits | Kafka's World
    Someone Solved Your Question?
    Please let other members know by clicking on ’Mark as Accepted Solution’
    Helpful Post?
    If a post has been helpful, say thanks by clicking the ratings star.

Maybe you are looking for

  • "Unable to Check Out File Error" Message

    I'm new to using Adobe products, so forgive me if this is a dumb question! My graphic designer sent me a INDD file to edit the text in and when I try to open it in both InDesign and InCopy, I receive an "Unable to Check Out this File" error message.

  • How to change the default date in Person assignment tab?

    Hi experts, Does anyone know how to change the default date in person assignment tab in cj20n? Currently, the system always take the scheduled finish date to the date of the person assignment tab. Can I change it to the start date? Thanks and rgs, Mi

  • How do I insert/Delete/Update a row to the DB Table from Business Component Browser

    I am using the wizard and created a project containing Business component which contain some table. When I run the project I could see "Oracle Business Component Browser(local)" and when I select some table from "View Object Member" I get a window di

  • My ipod is not being recognized by my computer AND itunes

    When i connect my ipod, its not getting recognized by the computer AND itunes. i've read all the troubleshooting things and nothing works. is there someone who could help me please? i can't put any music, movies or anything on my ipod and just a whil

  • Server PHP GD support

    Hello, I know this issue has been a subject around for awhile..  I am well aware their are many subjects online abut how to resolve this.. However, I belive my concern may be a little different.. I am coming from a better understanding of IIS.. I'll