Exemplo n.º 1
0
def rootlist(db=False):
    start = 0
    count = 200
    db_shows = []
    while start < count:
        data = cove.programs.filter(filter_producer__name='PBS',
                                    order_by='title',
                                    limit_start=start)
        results = data['results']
        count = data['count']
        stop = data['stop']
        del data
        for result in results:
            if len(result['nola_root'].strip()) != 0:
                program_id = re.compile('/cove/v1/programs/(.*?)/').findall(
                    result['resource_uri'])[0]
                name = result['title'].encode('utf-8')
                if db == True:
                    db_shows.append((name, 'pbs', 'show', program_id))
                else:
                    common.addShow(name, 'pbs', 'show', program_id)
        start = stop
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 2
0
def shows(cid=common.args.url, db=False):
    name = common.args.name
    xbmcplugin.setContent(pluginhandle, 'shows')
    if name == 'Full Episodes':
        mode = 'episode'
    else:
        mode = 'show'
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    url = getCollections + '?id=' + cid
    html = common.getURL(url)
    tree = BeautifulStoneSoup(html,
                              convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    collections = tree.findAll('collection')
    db_shows = []
    for collection in collections:
        cid = collection['id']
        name = collection.find('name').string.replace(': Full Episodes', '')
        if db == True:
            db_shows.append((name, 'tbs', mode, cid))
        else:
            common.addShow(name, 'tbs', mode, cid)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 3
0
def rootlist(db=False):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    db_shows = []
    data = common.getURL(BASEURL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    showpages = tree.findAll(attrs={'class':'watch more'}) 
    for show in showpages:
        url = show['href']
        name = url.split('/')[2].replace('-',' ').title()
        url = BASE + url
        if db==True:
            db_shows.append((name,'history','showcats',url))
        else:
            common.addShow(name, 'history', 'showcats', url)
    data = common.getURL(H2URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    showpages = tree.findAll(attrs={'class':'watch more'})
    for show in showpages:
        url = show['href']
        name = url.split('/')[2].replace('-',' ').title()
        url = BASE + url
        if db==True:
            db_shows.append((name,'history','showcats',url))
        else:
            common.addShow(name, 'history', 'showcats', url)
    if db==True:
        return db_shows    
    else:
        common.setView('tvshows')
Exemplo n.º 4
0
def shows(url=common.args.url,db=False):
    data = common.getURL(showlist)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu = tree.find('div',attrs={'id':'accordion','class':'view-content'}).findAll('h3')
    names = []
    for item in menu:
        name = item.find('a',attrs={'href':'#'}).string
        names.append(name)
    if db == False:
        marker = names.index(url)
    elif db == True:
        marker = names.index('Current Shows')
    menu = tree.find('div',attrs={'id':'accordion','class':'view-content'})
    shows = menu.findAll('div',recursive=False)[marker].findAll('li')
    dbshows = []
    for show in shows:
        showdata = show.findAll(attrs={'class':'field-content'})
        name = showdata[0].a.string
        showid = showdata[1].string
        if db == False:
            if 'Movies' in common.args.name:
                common.addDirectory(name, 'lifetime', 'showroot', showid)
            else:
                common.addShow(name, 'lifetime', 'showroot', showid)
        elif db == True:
            dbshows.append((name, 'lifetime', 'showroot', showid))
    if db == True:
        return dbshows
    else:
        common.setView('tvshows')
Exemplo n.º 5
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    data = unicode(data, 'utf-8', errors='ignore')
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu=tree.find('li',attrs={'class':'nav_item_3'}).findAll('a')
    db_shows = []
    for item in menu:
        name = item.string
        url = item['href']
        if 'http://' not in url:
            url = BASE_URL+url 
        if name <> 'Episodes':
            if name == 'South Park':
                mode = 'sp_seasons'
            elif name <> 'The Daily Show with Jon Stewart' and name <> 'The Colbert Report':
                mode = 'ccepisodes'
            else:
                mode = 'episodes'
            if db==True:
                db_shows.append((name,'comedy',mode,url))
            else:
                common.addShow(name,'comedy',mode,url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 6
0
def listCatType(url,db,showtype=True):
    data = common.getURL(url)
    db_shows=[]
    if data:
        items = demjson.decode(data)['Entries']
        for item in items:
            show_id=str(item['ID'])
            name=item['Name']
            if db==True:
                db_shows.append((name, 'crackle', 'showroot', show_id))
            else:
                if showtype:
                    common.addShow(name, 'crackle', 'showroot', show_id)
                else:
                    plot=item['Description']
                    genre=item['Genre'] 
                    thumb=item['ChannelArtTileLarge'] 
                    fanart=item['ChannelArtLandscape']
                    common.addDirectory(name, 'crackle', 'showroot', show_id, thumb, '', plot, '',genre)
    if db==True:
        return db_shows
    elif showtype:
        common.setView('tvshows')
    else:
        common.setView('seasons')
Exemplo n.º 7
0
def shows(cid = common.args.url,db=False):
        name = common.args.name
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
        if name == 'Full Episodes' or name == 'Web Exclusives':
            mode = 'episode' #EPISODE() Mode
        else:
            mode = 'show' #SHOW() Mode
        url = 'http://www.tnt.tv/content/services/getCollections.do?site=true&id=58127'
        html=common.getURL(BASE_URL)
        tree=BeautifulStoneSoup(html, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
        collections = tree.findAll('collection')
        db_shows = []
        for collection in collections:
                if collection['id'] == cid:
                        subcollections = collection.findAll('subcollection')
                        for subcollection in subcollections:
                                scid = subcollection['id']
                                name = subcollection.find('name').string.split('-')[0].replace('Full Episodes','').strip()
                                if db==True:
                                        db_shows.append((name,'tnt',mode,scid))
                                else:
                                        common.addShow(name, 'tnt', mode, scid)
        if db==True:
                return db_shows
        else:
                common.setView('tvshows') 
Exemplo n.º 8
0
def shows(url=common.args.url,db=False):
    data = common.getURL(showlist)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu = tree.find('div',attrs={'id':'accordion','class':'view-content'}).findAll('h3')
    names = []
    for item in menu:
        name = item.find('a',attrs={'href':'#'}).string
        names.append(name)
    if db == False:
        marker = names.index(url)
    elif db == True:
        marker = names.index('Current Shows')
    menu = tree.find('div',attrs={'id':'accordion','class':'view-content'})
    shows = menu.findAll('div',recursive=False)[marker].findAll('li')
    dbshows = []
    for show in shows:
        showdata = show.findAll(attrs={'class':'field-content'})
        name = showdata[0].a.string
        showid = showdata[1].string
        if db == False:
            if 'Movies' in common.args.name:
                common.addDirectory(name, 'lifetime', 'showroot', showid)
            else:
                common.addShow(name, 'lifetime', 'showroot', showid)
        elif db == True:
            dbshows.append((name, 'lifetime', 'showroot', showid))
    if db == True:
        return dbshows
    else:
        common.setView('tvshows')
Exemplo n.º 9
0
def listCatType(url, db, showtype=True):
    data = common.getURL(url)
    db_shows = []
    if data:
        items = demjson.decode(data)['Entries']
        for item in items:
            show_id = str(item['ID'])
            name = item['Name']
            if db == True:
                db_shows.append((name, 'crackle', 'showroot', show_id))
            else:
                if showtype:
                    common.addShow(name, 'crackle', 'showroot', show_id)
                else:
                    plot = item['Description']
                    genre = item['Genre']
                    thumb = item['ChannelArtTileLarge']
                    fanart = item['ChannelArtLandscape']
                    common.addDirectory(name, 'crackle', 'showroot', show_id,
                                        thumb, '', plot, '', genre)
    if db == True:
        return db_shows
    elif showtype:
        common.setView('tvshows')
    else:
        common.setView('seasons')
Exemplo n.º 10
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    data = unicode(data, 'utf-8', errors='ignore')
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu = tree.find('li', attrs={'class': 'nav_item_3'}).findAll('a')
    db_shows = []
    for item in menu:
        name = item.string
        url = item['href']
        if 'http://' not in url:
            url = BASE_URL + url
        if name <> 'Episodes':
            if name == 'South Park':
                mode = 'sp_seasons'
            elif name <> 'The Daily Show with Jon Stewart' and name <> 'The Colbert Report':
                mode = 'ccepisodes'
            else:
                mode = 'episodes'
            if db == True:
                db_shows.append((name, 'comedy', mode, url))
            else:
                common.addShow(name, 'comedy', mode, url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 11
0
def rootlist(db=False):
    shows = []
    multishow = {}

    # Grab Current Shows
    data = common.getURL('http://www.mtv.com/ontv/all/current.jhtml')
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows, multishow = grabShowlist(tree, shows, multishow)

    # Grab Current Shows MTV2
    data = common.getURL('http://www.mtv.com/ontv/all/currentMtv2.jhtml')
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows, multishow = grabShowlist(tree, shows, multishow)

    # Process Full Show List
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows, multishow = grabShowlist(tree, shows, multishow)
    pagintation = tree.find(attrs={'class': 'pagintation'}).findAll('a')
    for page in pagintation:
        if 'Next' in page.string:
            continue
        url = BASE_URL + page['href']
        data = common.getURL(url)
        tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
        shows, multishow = grabShowlist(tree, shows, multishow)

    # Grab Popular Shows
    popularShows = tree.find('div',
                             attrs={
                                 'id': 'shows-grid',
                                 'class': 'grid'
                             }).find('ul').findAll('a')
    for item in popularShows:
        name = item.string
        if 'All Shows' not in name:
            url = BASE + item['href']
            cleanname = name.split(' (Season')[0]
            if cleanname in multishow.keys():
                multishow[cleanname] = True
            else:
                multishow[cleanname] = False
                shows.append((cleanname, url))

    db_shows = []
    for name, url in shows:
        mode = 'showsub'
        db_shows.append((name, 'mtv', mode, url))
    if db == True:
        return db_shows
    else:
        for name, mode, submode, url in db_shows:
            common.addShow(name, mode, submode, url)
        common.setView('tvshows')
Exemplo n.º 12
0
def showbycat(categoryid=common.args.url):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(CONFIGURATION_URL)
    tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.XML_ENTITIES)
    categories = tree.find('logiccategories').findAll('category')
    for category in categories:
        if categoryid == category['categoryid']:
            shows = category.findAll('collection')
            for show in shows:
                showid = show['id']
                showname = show['name'].replace('ZVIP: ','')
                common.addShow(showname, 'adultswim', 'showroot', showid)
    common.setView('tvshows')
Exemplo n.º 13
0
def rootlist(db=False):
    shows = []
    multishow = {}
    
    # Grab Current Shows
    data = common.getURL('http://www.mtv.com/ontv/all/current.jhtml')
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows,multishow = grabShowlist(tree,shows,multishow)

    # Grab Current Shows MTV2
    data = common.getURL('http://www.mtv.com/ontv/all/currentMtv2.jhtml')
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows,multishow = grabShowlist(tree,shows,multishow)
     
    # Process Full Show List
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows,multishow = grabShowlist(tree,shows,multishow)
    pagintation=tree.find(attrs={'class':'pagintation'}).findAll('a')
    for page in pagintation:
        if 'Next' in page.string:
            continue
        url = BASE_URL + page['href']
        data = common.getURL(url)
        tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
        shows,multishow = grabShowlist(tree,shows,multishow)
    
    # Grab Popular Shows
    popularShows = tree.find('div',attrs={'id':'shows-grid','class':'grid'}).find('ul').findAll('a')
    for item in popularShows:
        name = item.string
        if 'All Shows' not in name:
            url = BASE + item['href']
            cleanname = name.split(' (Season')[0]
            if cleanname in multishow.keys():
                multishow[cleanname]=True
            else:
                multishow[cleanname]=False
                shows.append((cleanname,url))
            
    db_shows=[]
    for name,url in shows:
        mode = 'showsub'
        db_shows.append((name, 'mtv', mode, url))
    if db==True:
        return db_shows
    else:
        for name, mode, submode, url in db_shows:
            common.addShow(name,mode,submode,url)
        common.setView('tvshows')
Exemplo n.º 14
0
def showbycat(categoryid=common.args.url):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(CONFIGURATION_URL)
    tree = BeautifulStoneSoup(data,
                              convertEntities=BeautifulStoneSoup.XML_ENTITIES)
    categories = tree.find('logiccategories').findAll('category')
    for category in categories:
        if categoryid == category['categoryid']:
            shows = category.findAll('collection')
            for show in shows:
                showid = show['id']
                showname = show['name'].replace('ZVIP: ', '')
                common.addShow(showname, 'adultswim', 'showroot', showid)
    common.setView('tvshows')
Exemplo n.º 15
0
def droplist(homedir):
    url  = 'http://www.aetv.com/minisite/videoajx.jsp'
    url += '?homedir='+homedir
    url += '&pfilter=ALL%20VIDEOS'
    url += '&sfilter=All%20Categories'
    url += '&seriesfilter=ALL%20SERIES'
    data = common.getURL(url)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows = tree.find('div',attrs={'id':'series_filter'}).findAll('li',attrs={'class':None})
    for show in shows:
        name = show.find('a').string
        url  = 'http://www.aetv.com/minisite/videoajx.jsp'
        url += '?homedir='+homedir
        url += '&seriesfilter='+name.replace(' ','%20')
        common.addShow(name, 'aetv', 'show_primary_filter', url)
Exemplo n.º 16
0
def rootlist(db=False):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(BASE_URL)
    shows = demjson.decode(data)['items']
    db_shows = []
    for item in shows:
        url = item['fullTitle']
        name = item['fullTitle']
        if db == True:
            db_shows.append((name, 'pbskids', 'episodes', url))
        else:
            common.addShow(name, 'pbskids', 'episodes', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 17
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows=tree.findAll('div',attrs={'class':'filter-content-more'})[3].findAll('li')
    db_shows = []
    for show in shows:
        name = show.find('span',attrs={'class':'filter-name'}).string
        url = show['data-value']        
        if db==True:
            db_shows.append((name, 'nick', 'episodes', url))
        else:
            common.addShow(name, 'nick', 'episodes', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 18
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    items=tree.find(attrs={'class':'playlists'}).findAll('a')
    db_shows = []
    for item in items:
        name = item.string.split('-')[0].replace('Full Episodes','').strip()
        url = BASE+item['href'].replace('channel-video/json/','feeds/channel-video/').replace(',00.json','_RA,00.json')
        if db==True:
            db_shows.append((name, 'food', 'show', url))
        else:
            common.addShow(name, 'food', 'show', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 19
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu=tree.find(attrs={'id':'fullEpisodesListing'}).findAll(attrs={'class' : 'showInfo'})
    db_shows = []
    for item in menu:
        name = item.find('h3').string
        url = BASE + item.findAll('a')[1]['href']+'/full-episodes/'
        if db==True:
            db_shows.append((name,'fox','episodes',url))
        else:
            common.addShow(name, 'fox', 'episodes', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 20
0
def rootlist(db=False):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(BASE_URL)
    shows = demjson.decode(data)["items"]
    db_shows = []
    for item in shows:
        url = item["fullTitle"]
        name = item["fullTitle"]
        if db == True:
            db_shows.append((name, "pbskids", "episodes", url))
        else:
            common.addShow(name, "pbskids", "episodes", url)
    if db == True:
        return db_shows
    else:
        common.setView("tvshows")
Exemplo n.º 21
0
def rootlist(db=False):
    data = common.getURL(showlist)
    tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    menu=tree.findAll('item')
    db_shows = []
    for item in menu:
        name = item('title')[0].string.encode('utf-8')
        url = item('link')[0].string
        thumb = item('image')[0].string
        if db==True:
            db_shows.append((name,'abc','seasons',url))
        else:
            common.addShow(name, 'abc', 'seasons', url )# , thumb)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 22
0
def rootlist(db=False):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(BASE_URL)
    shows = demjson.decode(data)['entries']
    db_shows = []
    for item in shows:
        print item
        url = item['plcategory$fullTitle']
        name = item['title']
        if db == True:
            db_shows.append((name, 'oxygen', 'showroot', url))
        else:
            common.addShow(name, 'oxygen', 'showroot', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 23
0
def rootlist(db=False):
    db_shows = []
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows=tree.findAll('li',attrs={'id':True,'class':re.compile('result-item.+?')})
    for show in shows:
        show=show.find('a')
        url = BASE+show['href']
        showname = show['title']
        if db==True:
            db_shows.append((showname, 'marvelkids', 'show', url))
        else:
            common.addShow(showname, 'marvelkids', 'show', url)    
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 24
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows = tree.findAll('div', attrs={'class':
                                       'filter-content-more'})[3].findAll('li')
    db_shows = []
    for show in shows:
        name = show.find('span', attrs={'class': 'filter-name'}).string
        url = show['data-value']
        if db == True:
            db_shows.append((name, 'nick', 'episodes', url))
        else:
            common.addShow(name, 'nick', 'episodes', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 25
0
def rootlist(db=False):
    db_shows = []
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows = tree.findAll('li')
    for show in shows:
        show = show.find('a')
        url = BASE + show['href'] + '?limit=100'
        showname = show.string.rsplit(' ', 1)[0].strip()
        if db == True:
            db_shows.append((showname, 'marvel', 'show', url))
        else:
            common.addShow(showname, 'marvel', 'show', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 26
0
def rootlist(db=False):
    xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(BASE_URL)
    shows = demjson.decode(data)['entries']
    db_shows = []
    for item in shows:
        url = item['plcategory$fullTitle']
        name = item['title']
        if db==True:
            db_shows.append((name,'syfy','showroot',url))
        else:
            common.addShow(name, 'syfy', 'showroot', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 27
0
def rootlist(db=False):
    for url in (BASE_URL,SPECIALS_BASE_URL):
        data = common.getURL(url)
        tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
        shows=tree.findAll('div',attrs={'class':'natgeov-cat-group'})
        db_shows=[]
        for show in shows:
            name = show.find('h3').contents[0].split('(')[0].strip()
            url = BASE + show.find('a')['href']
            if db==True:
                db_shows.append((name, 'natgeowild', 'showsub', url))
            else:
                common.addShow(name, 'natgeowild', 'showsub', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 28
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    db_shows = []
    shows=tree.find('select',attrs={'id':'dropdown-by-show'}).findAll('option')
    for show in shows:
        name = show.string
        if name <> 'All Shows':
            url = show['value']      
            if db==True:
                db_shows.append((name, 'nickteen', 'episodes', url))
            else:
                common.addShow(name, 'nickteen', 'episodes', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 29
0
def rootlist(db=False):
    db_shows = []
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows=tree.findAll('li')
    for show in shows:
        show=show.find('a')
        url = BASE+show['href']+'?limit=100'
        showname = show.string.rsplit(' ',1)[0].strip()
        if db==True:
            db_shows.append((showname, 'marvel', 'show', url))
        else:
            common.addShow(showname, 'marvel', 'show', url)    
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 30
0
def rootlist(db=False):
    xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows=tree.find('select',attrs={'id':'rb-video-browser-show'}).findAll('option',attrs={'title':True})
    db_shows = []
    for show in shows:
        name = show.string.encode('utf-8')
        url = show['value']
        if db==True:
            db_shows.append((name,'amc','showcats',url))
        else:
            common.addShow(name, 'amc', 'showcats', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 31
0
def rootlist(db=False):
    for url in (BASE_URL, ):
        data = common.getURL(url)
        tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
        shows = tree.findAll('div', attrs={'class': 'natgeov-cat-group'})
        db_shows = []
        for show in shows:
            name = show.find('h3').contents[0].split('(')[0].strip()
            url = BASE + show.find('a')['href']
            if db == True:
                db_shows.append((name, 'natgeo', 'showsub', url))
            else:
                common.addShow(name, 'natgeo', 'showsub', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 32
0
def rootlist(db=False):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(BASE_URL)
    shows = demjson.decode(data)['entries']
    db_shows = []
    dupes = []
    for item in shows:
        name = item['pl1$show'][0]
        if name not in dupes:
            if db == True:
                db_shows.append((name, 'bravo', 'episodes', name))
            else:
                common.addShow(name, 'bravo', 'episodes', name)
            dupes.append(name)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 33
0
def rootlist(db=False):
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    data = common.getURL(BASE_URL)
    shows = demjson.decode(data)['entries']
    db_shows = []
    dupes = []
    for item in shows:
        name = item['pl1$show'][0]
        if name not in dupes:
            if db==True:
                db_shows.append((name,'bravo','episodes',name))
            else:
                common.addShow(name, 'bravo', 'episodes', name)
            dupes.append(name)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 34
0
def rootlist(db=False):
    data = common.getURL(showlist)
    tree = BeautifulStoneSoup(data,
                              convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    menu = tree.findAll('item')
    db_shows = []
    for item in menu:
        name = item('title')[0].string.encode('utf-8')
        url = item('link')[0].string
        thumb = item('image')[0].string
        if db == True:
            db_shows.append((name, 'abc', 'seasons', url))
        else:
            common.addShow(name, 'abc', 'seasons', url)  # , thumb)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 35
0
def rootlist(db=False):
    data = common.getURL(BASE)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows=tree.find('ul',attrs={'class':'sub-menu sub-menu-1'}).findAll('a')
    db_shows = []
    for show in shows:
        url = show['href']+'videos/'
        if BASE not in url:
            url = BASE+url
        name = show.find('span').string
        if db==True:
            db_shows.append((name, 'gsn', 'show', url))
        else:
            common.addShow(name, 'gsn', 'show', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 36
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    items = tree.find(attrs={'class': 'playlists'}).findAll('a')
    db_shows = []
    for item in items:
        name = item.string.split('-')[0].replace('Full Episodes', '').strip()
        url = BASE + item['href'].replace('channel-video/json/',
                                          'feeds/channel-video/').replace(
                                              ',00.json', '_RA,00.json')
        if db == True:
            db_shows.append((name, 'food', 'show', url))
        else:
            common.addShow(name, 'food', 'show', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 37
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows = tree.find('div', attrs={'id': 'channelCarousel'})
    if shows:
        shows = shows.findAll('a')
        db_shows = []
        for show in shows:
            name = show.find('img')['alt'].strip()
            url = show['title']
            if db == True:
                db_shows.append((name, 'thewbkids', 'fullepisodes', url))
            else:
                common.addShow(name, 'thewbkids', 'fullepisodes', url)
        if db == True:
            return db_shows
        else:
            common.setView('tvshows')
Exemplo n.º 38
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    items = tree.find('ul',
                      attrs={
                          'class': 'left-col-menu video-landing clearfix'
                      }).findAll('li', attrs={'class': True})
    db_shows = []
    common.addShow('Full Biographies', 'bio', 'full_bios', '/videos/full-bios')
    for item in items:
        if item['class'] == 'mainItem expanded' or item['class'] == 'mainItem ':
            if item.find('span').string == 'Shows':
                sub = item.find('ul')
                if sub <> None:
                    subcats = sub.findAll('li')
                    for cat in subcats:
                        link = cat.find('a')
                        name = link.find('span').string
                        url = link['href']
                        if db == True:
                            db_shows.append((name, 'bio', 'videos', url))
                        else:
                            common.addShow(name, 'bio', 'videos', url)
            else:
                link = item.find('a')
                name = link.find('span').string
                url = link['href']
                common.addDirectory(name, 'bio', 'videos', url)
                sub = item.find('ul')
                if sub <> None:
                    subcats = sub.findAll('li')
                    for cat in subcats:
                        link = cat.find('a')
                        name = link.find('span').string
                        url = link['href']
                        if db == True:
                            pass
                            #db_shows.append((name, 'bio', 'videos', url))
                        else:
                            common.addDirectory(name, 'bio', 'videos', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 39
0
def rootlist(db=False):
    if (common.settings['enableproxy'] == 'true'): proxy = True
    else: proxy = False
    data = common.getURL(BASE_URL, proxy=proxy)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows = tree.find('div', attrs={'id': 'show-directory'}).findAll('li')
    db_shows = []
    for show in shows:
        link = show.find('a')
        name = link.contents[0].strip()
        url = BASE + link['href']
        if db == True:
            db_shows.append((name, 'thewb', 'fullepisodes', url))
        else:
            common.addShow(name, 'thewb', 'fullepisodes', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 40
0
def rootlist(db=False):
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
        html=common.getURL(getCollectionsFull)
        tree=BeautifulStoneSoup(html, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
        collections = tree.findAll('collection')
        db_shows = []
        for collection in collections:
                subcollections = collection.findAll('subcollection')
                for subcollection in subcollections:
                        scid = subcollection['id']
                        name = subcollection.find('name').string.replace('- Full Episodes','').encode('utf-8')
                        if db==True:
                                db_shows.append((name,'cartoon', 'episodes',scid))
                        else:
                                common.addShow(name, 'cartoon', 'episodes', scid)
        if db==True:
                return db_shows
        else:
            common.setView('tvshows')
Exemplo n.º 41
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu=tree.find('div',attrs={'id':'shows-video'}).findAll('li')
    db_shows = []
    for item in menu:
        url = BASE + item.find('a')['href']
        #thumb = item.find('img')['src']
        showname = item.find('p',attrs={'class':'t'}).string.strip()
        #if showname == 'More Video':
        #    continue
        if db==True:
            db_shows.append((showname,'thecw','show',url))
        else:
            common.addShow(showname, 'thecw', 'show', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 42
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu = tree.find('div', attrs={'id': 'shows-video'}).findAll('li')
    db_shows = []
    for item in menu:
        url = BASE + item.find('a')['href']
        #thumb = item.find('img')['src']
        showname = item.find('p', attrs={'class': 't'}).string.strip()
        #if showname == 'More Video':
        #    continue
        if db == True:
            db_shows.append((showname, 'thecw', 'show', url))
        else:
            common.addShow(showname, 'thecw', 'show', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 43
0
def rootlist(db=False):
    xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
    data = common.getURL(BASE_URL)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows = tree.find('select', attrs={
        'id': 'rb-video-browser-show'
    }).findAll('option', attrs={'title': True})
    db_shows = []
    for show in shows:
        name = show.string.encode('utf-8')
        url = show['value']
        if db == True:
            db_shows.append((name, 'amc', 'showcats', url))
        else:
            common.addShow(name, 'amc', 'showcats', url)
    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 44
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    menu=tree.find(attrs={'class':'networkGroup'}).findAll('div',recursive=False)
    db_shows = []
    for item in menu:
        link = item.find('a')
        name = link['title']
        url = link['page']
        description = link['desc']
        thumb = item.find('img')['src']
        if db==True:
            db_shows.append((name,'abcfamily','showcats',url))
        else:
            common.addShow(name, 'abcfamily', 'showcats', url) #, thumb, thumb, description)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 45
0
def rootlist(db=False):
    if (common.settings['enableproxy'] == 'true'):proxy = True
    else:proxy = False
    data = common.getURL(BASE_URL,proxy=proxy)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    shows=tree.find('div',attrs={'id':'show-directory'}).findAll('li')
    db_shows = []
    for show in shows:
        link=show.find('a')
        name = link.contents[0].strip()
        url = BASE+link['href']
        if db==True:
            db_shows.append((name, 'thewb', 'fullepisodes', url))
        else:
            common.addShow(name, 'thewb', 'fullepisodes', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 46
0
def rootlistRSS(db=False):
    data = common.getURL(RSS_URL)
    tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    menu=tree.findAll('item')
    db_shows = []
    for item in menu:
        name = item('title')[0].string.encode('utf-8')
        url = item('link')[0].string
        splitUrl = url.split('/watch/')
        url = splitUrl[0]+'/shows/'+splitUrl[1].split('/')[0]+'/videos'
        thumb = item('image')[0].string
        if db==True:
            db_shows.append((name,'abcfamily','showcats',url))
        else:
            common.addShow(name, 'abcfamily','showcats', url )# , thumb)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 47
0
def shows(url=common.args.url, choosenCat='Show Library', db=False):
    data = common.getURL(url)
    tree = BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu = tree.find(attrs={'class': 'scet-gallery-nav'})
    categories = menu.findAll('h3')
    for category in categories:
        if choosenCat == category.string:
            marker = categories.index(category)
    items = menu.findAll('ul')[marker].findAll('a')
    db_shows = []
    dupecheck = []
    #            ('Revolution','nbc','showroot','http://www.nbc.com/revolution/video/nobodys-fault-but-mine/1425158/'),
    #            ('Chicago Fire','nbc','showroot','http://www.nbc.com/chicago-fire/video/categories/season-1/1416546/')]
    #common.addShow('Revolution','nbc','showroot','http://www.nbc.com/revolution/video/nobodys-fault-but-mine/1425158/')
    #common.addShow('Chicago Fire','nbc','showroot','http://www.nbc.com/chicago-fire/video/categories/season-1/1416546/')
    for item in items:
        name = item.string
        url = item['href']
        #if db==True:
        db_shows.append((name, 'nbc', 'showroot', url))
        dupecheck.append(name)
        #else:
        #    common.addShow(name, 'nbc', 'showroot', url)

    items = tree.findAll('ul', attrs={'class': 'scet_th_list'})
    for list in items:
        for item in list.findAll('li', recursive=False):
            link = item.find('a')
            name = link['title']
            url = link['href']
            if name not in dupecheck:
                db_shows.append((name, 'nbc', 'showroot', url))
                dupecheck.append(name)

    if not db:
        for show in db_shows:
            common.addShow(show[0], 'nbc', 'showroot', show[3])

    if db == True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 48
0
def shows(url = common.args.url, choosenCat='Show Library', db=False):
    data = common.getURL(url)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu=tree.find(attrs={'class' : 'scet-gallery-nav'})
    categories=menu.findAll('h3')
    for category in categories:
        if choosenCat == category.string:
            marker = categories.index(category)
    items = menu.findAll('ul')[marker].findAll('a')
    db_shows = []
    dupecheck = []
    #            ('Revolution','nbc','showroot','http://www.nbc.com/revolution/video/nobodys-fault-but-mine/1425158/'),
    #            ('Chicago Fire','nbc','showroot','http://www.nbc.com/chicago-fire/video/categories/season-1/1416546/')]
    #common.addShow('Revolution','nbc','showroot','http://www.nbc.com/revolution/video/nobodys-fault-but-mine/1425158/')
    #common.addShow('Chicago Fire','nbc','showroot','http://www.nbc.com/chicago-fire/video/categories/season-1/1416546/')
    for item in items:
        name = item.string
        url = item['href']
        #if db==True:
        db_shows.append((name,'nbc','showroot',url))
        dupecheck.append(name)
        #else:
        #    common.addShow(name, 'nbc', 'showroot', url)
    
    items = tree.findAll('ul',attrs={'class':'scet_th_list'})
    for list in items:
        for item in list.findAll('li',recursive=False):
            link = item.find('a')
            name = link['title']
            url = link['href']
            if name not in dupecheck:
                db_shows.append((name,'nbc','showroot',url))
                dupecheck.append(name)

    if not db:
        for show in db_shows:
            common.addShow(show[0], 'nbc', 'showroot', show[3])

    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 49
0
def stShows(url = common.args.url,db=False):
    stbase = 'http://www.startrek.com'
    data = common.getURL(url)
    remove = re.compile('<!.*?">')
    data = re.sub(remove, '', data)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    stshows=tree.find('div',attrs={'id' : 'channels'}).findAll('li', attrs={'class' : True})
    st_shows = []      
    for show in stshows:
        name = show['class'].replace('-',' ').title()
        thumb = stbase+show.find('img')['src']
        url = stbase+show.find('a')['href']
        if 'Star Trek' not in name:
            name = 'Star Trek '+name
        if db:
            st_shows.append((name,'cbs','stshowcats',url))
        else:
            common.addShow(name, 'cbs', 'stshowcats', url)#, thumb=thumb)
    if db:
        return st_shows
Exemplo n.º 50
0
def rootlist(db=False):
    data = common.getURL(BASE)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    categories=tree.find('div',attrs={'class' : 'showsList'}).findAll('a')
    db_shows = []
    for show in categories:
        url = show['href']
        name = show.contents[0].strip()
        #if name == 'Hot in Cleveland':
        #    mode = 'hic_episodes'
        #else:
        mode = 'episodes'
        if db==True:
            db_shows.append((name,'tvland',mode,url))
        else:
            common.addShow(name, 'tvland', mode, url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
Exemplo n.º 51
0
def stShows(url = common.args.url,db=False):
    stbase = 'http://www.startrek.com'
    data = common.getURL(url)
    remove = re.compile('<!.*?">')
    data = re.sub(remove, '', data)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    stshows=tree.find('div',attrs={'id' : 'channels'}).findAll('li', attrs={'class' : True})
    st_shows = []      
    for show in stshows:
        name = show['class'].replace('-',' ').title()
        thumb = stbase+show.find('img')['src']
        url = stbase+show.find('a')['href']
        if 'Star Trek' not in name:
            name = 'Star Trek '+name
        if db:
            st_shows.append((name,'cbs','stshowcats',url))
        else:
            common.addShow(name, 'cbs', 'stshowcats', url)#, thumb=thumb)
    if db:
        return st_shows
Exemplo n.º 52
0
def rootlist(db=False):
    data = common.getURL(BASE_URL)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    items=tree.find('ul',attrs={'class':'left-col-menu video-landing clearfix'}).findAll('li',attrs={'class':True})
    db_shows = []
    common.addShow('Full Biographies', 'bio', 'full_bios', '/videos/full-bios')
    for item in items:
        if item['class'] == 'mainItem expanded' or item['class'] == 'mainItem ':
            if item.find('span').string == 'Shows':
                sub=item.find('ul')
                if sub <> None:
                    subcats=sub.findAll('li')
                    for cat in subcats:
                        link = cat.find('a')
                        name = link.find('span').string
                        url = link['href']
                        if db==True:
                            db_shows.append((name, 'bio', 'videos', url))
                        else:
                            common.addShow(name, 'bio', 'videos', url)
            else:
                link = item.find('a')
                name = link.find('span').string
                url = link['href']
                common.addDirectory(name, 'bio', 'videos', url)
                sub=item.find('ul')
                if sub <> None:
                    subcats=sub.findAll('li')
                    for cat in subcats:
                        link = cat.find('a')
                        name = link.find('span').string
                        url = link['href']
                        if db==True:
                            pass
                            #db_shows.append((name, 'bio', 'videos', url))
                        else:
                            common.addDirectory(name, 'bio', 'videos', url)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')