def rootlist(): root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data, 'html.parser', parse_only=SoupStrainer('div', id='azshows')) root_menu = root_tree.find_all('a') for root_item in root_menu: root_name = root_item.text.replace('Season', '').strip() season_url = root_item['href'].replace('series.jhtml', 'video.jhtml?sort=descend') mode = 'show_subcats' if BASE not in season_url: season_url = BASE + season_url if root_name in blacklist: continue elif '/shows/events' in season_url: continue docontinue = False for series_name, choosen in multiseason: if series_name in root_name: if choosen is not root_name: docontinue = True elif choosen == root_name: root_name = series_name mode = 'seasons' if docontinue is True: continue if '(' in root_name: root_name = root_name.split('(')[0].strip() _common.add_show(root_name, SITE, mode, season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data, 'html.parser', parse_only = SoupStrainer('div', id = 'inner')) root_menu = root_tree.find_all('div', class_ = 'alpha-group') for root_tree2 in root_menu: for root_item in root_tree2.find_all('a'): root_name = root_item.text.replace('Season','').strip() season_url = root_item['href'].replace('series.jhtml','video.jhtml?sort=descend') mode = 'show_subcats' if BASE not in season_url: season_url = BASE + season_url if root_name in blacklist: continue elif '/shows/events' in season_url: continue docontinue = False for series_name, choosen in multiseason: if series_name in root_name: if choosen is not root_name: docontinue = True elif choosen == root_name: root_name = series_name mode = 'seasons' if docontinue is True: continue if '(' in root_name: root_name = root_name.split('(')[0].strip() _common.add_show(root_name, SITE, mode, season_url) _common.set_view('tvshows')
def add_root_shows(url, doubles = []): root_dict = {} root_data = _connection.getURL(url) root_tree = BeautifulSoup(root_data, 'html5lib') root_menu = root_tree.find('ol', class_ = 'lst').find_all('a') for root_item in root_menu: try: root_name = root_item.find('div', class_ = 'text-block').span.string except: root_name = root_item.text season = re.compile(r' \(Season \d+\)') root_name = season.sub('', root_name).strip() if 'series.jhtml' in root_item['href']: season_url = root_item['href'].replace('series.jhtml', 'video.jhtml?sort=descend') else: season_url = root_item['href'] + 'video.jhtml?sort=descend' if BASE not in season_url: season_url = BASE + season_url if season_url.split('season')[0].replace('video.jhtml?sort=descend','') not in doubles: tvdb_name = _common.get_show_data(root_name,SITE, 'seasons')[-1] if tvdb_name not in root_dict.keys(): root_dict[tvdb_name] = season_url else: root_dict[tvdb_name] = root_dict[tvdb_name] + ',' + season_url doubles.append(season_url.split('season')[0].replace('video.jhtml?sort=descend','')) for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'seasons', season_url) next = root_tree.find('a', class_ = 'page-next') if next: doubles = add_root_shows(BASE + next['href'], doubles) return doubles
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = simplejson.loads(root_data)['shows']['show'] for root_item in root_menu: fullepisodes = 0 clips = 0 if (int(root_item['clips']['count']['@total']) + int(root_item['fullepisodes']['count']['@total'])) > 0: if int(root_item['clips']['count']['@total']) > 0: try: if int(root_item['clips']['count']['video']['@accesslevel']) == 0: clips = int(root_item['clips']['count']['video']['$']) except: if int(root_item['clips']['count']['video'][0]['@accesslevel']) == 0: clips = int(root_item['clips']['count']['video'][0]['$']) if int(root_item['fullepisodes']['count']['@total']) > 0: try: if int(root_item['fullepisodes']['count']['video']['@accesslevel']) == 0: fullepisodes = int(root_item['fullepisodes']['count']['video']['$']) except: if int(root_item['fullepisodes']['count']['video'][0]['@accesslevel']) == 0: fullepisodes = int(root_item['fullepisodes']['count']['video'][0]['$']) if (fullepisodes + clips) > 0: root_name = root_item['title'] season_url = root_item['@id'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_start = 0 root_count = 200 root_check = [] root_menu = simplejson.loads(_connection.getURL(SHOWS, header = {'X-Requested-With' : 'XMLHttpRequest'})) for root_item in root_menu.itervalues(): for root_item in root_item: root_check.append(root_item['title']) while root_start < root_count: root_data = cove.programs.filter(fields = 'mediafiles', order_by = 'title', limit_start = root_start) root_menu = root_data['results'] root_count = root_data['count'] root_stop = root_data['stop'] del root_data for root_item2 in root_menu: if root_item2['website'] is None: root_website = '' else: root_website = root_item2['website'] if (root_item2['title'] in root_check) and ('pbskids.org' not in root_website): root_name = _common.smart_utf8(root_item2['title']) season_url = re.compile('/cove/v1/programs/(.*?)/').findall(root_item2['resource_uri'])[0] _common.add_show(root_name, SITE, 'seasons', season_url) root_start = root_stop _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data, 'html5lib').find_all('li') for root_item in root_menu: root_name = root_item.a.string.rsplit(' ',1)[0].strip() season_url = BASE + root_item.a['href'] + '?limit=100' _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data, 'html5lib').find_all(href = re.compile('/shows/')) for root_item in root_menu: root_name = root_item['title'] season_url = BASE + root_item['href'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): show_data = _connection.getURL(SHOWS) show_tree = BeautifulSoup(show_data, 'html5lib') show_menu = show_tree.find('div', id='shows-list').find_all('a') for show_item in show_menu: show_name = _common.smart_utf8(show_item.text) _common.add_show(show_name, SITE, 'seasons', show_item['href']) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data, 'html5lib').find_all('li') for root_item in root_menu: root_name = root_item.a.string.rsplit(' ', 1)[0].strip() season_url = BASE + root_item.a['href'] + '?limit=100' _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = simplejson.loads(root_data)['entries'] for root_item in root_menu: root_name = root_item['title'] season_url = root_item['plcategory$fullTitle'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = simplejson.loads(root_data)['shows'] for root_item in root_menu: if root_item['external_link'] == '': root_name = root_item['title'] _common.add_show(root_name, SITE, 'seasons', root_name) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data).find('select', id = 'rb-video-browser-show').find_all('option', title = True) for root_item in root_menu: root_name = root_item.text season_url = root_item['value'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = simplejson.loads(root_data)['shows'] for root_item in root_menu: root_name = root_item['show']['title'] season_url = BASE + root_item['show']['path'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data) root_menu = root_tree.footer.find_all('li', class_='views-row') for root_item in root_menu: root_name = _common.smart_utf8(root_item.text.strip()) season_url = root_item.a['href'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data).find( 'select', id='rb-video-browser-show').find_all('option', title=True) for root_item in root_menu: root_name = root_item.text season_url = root_item['value'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data, 'html5lib').find('ul', id = 'channelCarousel_ul') root_menu = root_tree.find_all('a') for root_item in root_menu: root_name = root_item.img['alt'].strip() season_url = root_item['title'] _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data) root_menu = root_tree.footer.find_all('li', class_ = 'views-row') for root_item in root_menu: root_name = _common.smart_utf8(root_item.text.strip()) season_url = root_item.a['href'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS, header = {'X-Forwarded-For' : '12.13.14.15'}) root_tree = BeautifulSoup(root_data, 'html5lib') root_menu = root_tree.find_all('div', class_ = 'filter-category right')[0].find_all('li') for root_item in root_menu: root_name = root_item.find('span', class_ = 'filter-name').text.replace('&','and') season_url = root_item['data-value'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data, 'html5lib').find_all(href=re.compile('/shows/')) for root_item in root_menu: root_name = root_item['title'] season_url = BASE + root_item['href'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def movielist(url = _common.args.url): root_dict = {} root_url = url root_data = _connection.getURL(root_url) root_menu = simplejson.loads(root_data)['Entries'] for root_item in root_menu: root_name = root_item['Title'] season_url = FULLEPISODES % root_item['ID'] _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_doubles = [] root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data, 'html.parser').find_all('div', class_ = 'title') for root_item in root_menu: root_name = root_item.text.strip() if root_name not in root_doubles: _common.add_show(root_name, SITE, 'seasons', root_name) root_doubles.append(root_name) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data, 'html.parser') root_menu = root_tree.find_all('option') root_menu.pop(0) for root_item in root_menu: root_name = root_item.string season_url = root_item['value'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data, 'html5lib').find('ul', id='channelCarousel_ul') root_menu = root_tree.find_all('a') for root_item in root_menu: root_name = root_item.img['alt'].strip() season_url = root_item['title'] _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_data = _connection.getURL(SHOWS, forwardheader='12.13.14.15') root_tree = BeautifulSoup(root_data, 'html5lib') root_menu = root_tree.find_all( 'div', class_='filter-category right')[0].find_all('li') for root_item in root_menu: root_name = root_item.find('span', class_='filter-name').text.replace( '&', 'and') season_url = root_item['data-value'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} root_url = SHOWS root_data = _connection.getURL(root_url) root_menu = simplejson.loads(root_data)['Entries'] for root_item in root_menu: root_name = root_item['Title'] season_url = FULLEPISODES % root_item['ID'] _common.add_show(root_name, SITE, 'seasons', season_url) _common.add_show('Crackle Movies', SITE, 'movielist', MOVIES) _common.set_view('tvshows')
def rootlist(): root_doubles = [] root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data, 'html.parser').find_all('div', class_='title') for root_item in root_menu: root_name = root_item.text.strip() if root_name not in root_doubles: _common.add_show(root_name, SITE, 'seasons', root_name) root_doubles.append(root_name) _common.set_view('tvshows')
def rootlist(): root_dict = {} for root_url in (SHOWS, ORIGINALS, MOVIES): root_data = _connection.getURL(root_url) root_menu = simplejson.loads(root_data)['result']['data'] for root_item in root_menu: root_name = root_item['title'] season_url = root_item['link'] root_dict[root_name] = season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} for root_url in (CLIPS, SHOWS): root_data = _connection.getURL(root_url) root_tree = BeautifulSoup(root_data, 'html.parser', parse_only = SoupStrainer('div', class_ = 'showsList')) root_menu = root_tree.find_all('a') for root_item in root_menu: root_name = root_item.contents[0].strip() season_url = root_item['href'].rsplit('/', 1)[0] root_dict[root_name] = season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} for root_url in (CLIPS, SHOWS): root_data = _connection.getURL(root_url) root_tree = BeautifulSoup(root_data, 'html5lib').find('div', id = 'show-directory') root_menu = root_tree.find_all('li') for root_item in root_menu: root_name = clean_title(root_item.a.text) season_url = BASE + root_item.a['href'] root_dict[root_name] = season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} for root_url in (SHOWS, SPECIALS): root_data = _connection.getURL(root_url) root_tree = BeautifulSoup(root_data, 'html.parser', parse_only = SoupStrainer('div', id = 'content')) root_menu = root_tree.find_all('div', class_ = 'natgeov-cat-group') for root_item in root_menu: root_name = root_item.h3.text.split('(')[0].strip() season_url = BASE + root_item.a['href'] root_dict[root_name] = season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} for root_url in (CLIPS, SHOWS): root_data = _connection.getURL(root_url) root_tree = BeautifulSoup(root_data, 'html5lib').find('div', id='show-directory') root_menu = root_tree.find_all('li') for root_item in root_menu: root_name = clean_title(root_item.a.text) season_url = BASE + root_item.a['href'] root_dict[root_name] = season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'episodes', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} root_doubles = [] root_url = SHOWS root_data = _connection.getURL(root_url) root_tree = BeautifulSoup(root_data, 'html.parser', parse_only = SoupStrainer('ul')) root_menu = root_tree.find('li', class_ = 'nav_item_3').find_all('a', href = re.compile('[^#]+')) for root_item in root_menu: root_name = root_item.string if root_name not in root_doubles and root_name.split(' with ')[0] not in root_doubles: season_url = root_item['href'] if season_url.endswith('full-episodes'): season_url = season_url[:-13] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(SITE, SHOWS, SPECIALS): root_dict = {} for root_url in (SHOWS, SPECIALS): root_data = _connection.getURL(root_url) root_tree = BeautifulSoup(root_data, "html.parser", parse_only=SoupStrainer("div", id="content")) root_menu = root_tree.find_all("div", class_="natgeov-cat-group") for root_item in root_menu: secured_episodes = len(root_item.find_all("img", src=re.compile("AUTH"))) total_episodes = len(root_item.find_all("img")) if secured_episodes != total_episodes: root_name = root_item.h3.text.split("(")[0].strip() season_url = BASE + root_item.a["href"] root_dict[root_name] = season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, "episodes", season_url) _common.set_view("tvshows")
def rootlist(): root_dict = {} root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data, 'html5lib') root_menu = root_tree.allcollections.find_all('collection') for root_item in root_menu: root_name = _common.smart_utf8(root_item['name']) tvdb_name = _common.get_show_data(root_name, SITE, 'seasons')[-1] if tvdb_name not in root_dict.keys(): root_dict[tvdb_name] = root_item['id'] else: root_dict[tvdb_name] = root_dict[tvdb_name] + ',' + root_item['id'] for root_name in root_dict: season_url = root_dict[root_name] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} for root_url in (CLIPS, SHOWS): root_data = _connection.getURL(root_url) root_tree = BeautifulSoup(root_data, 'html.parser', parse_only=SoupStrainer('div', class_='showsList')) root_menu = root_tree.find_all('a') for root_item in root_menu: root_name = root_item.contents[0].strip() season_url = root_item['href'].rsplit('/', 1)[0] root_dict[root_name] = season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_doubles = [] root_dict = {} root_data = _connection.getURL(SHOWS) root_menu = BeautifulSoup(root_data, 'html.parser').find_all('div', class_ = 'title') for root_item in root_menu: root_name = root_item.text.strip() if root_name not in root_doubles: tvdb_name = _common.get_show_data(root_name,SITE, 'seasons')[-1] if tvdb_name not in root_dict.keys(): root_dict[tvdb_name] = root_name else: root_dict[tvdb_name] = root_dict[tvdb_name] + ',' + root_name root_doubles.append(root_name) for root_name in root_dict: season_url = root_dict[root_name] _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def rootlist(): root_dict = {} root_data = _connection.getURL(SHOWS) root_tree = BeautifulSoup(root_data, 'html5lib') root_section = root_tree.find_all('div', class_ = 'primetime_and_originals') for section in root_section: root_menu = section.find_all('a', text = True) for root_item in root_menu: root_name = root_item.text tvdb_name = _common.get_show_data(root_name,SITE, 'seasons')[-1] season_url = BASE + root_item['href'] if tvdb_name not in root_dict.keys(): root_dict[tvdb_name] = season_url else: root_dict[tvdb_name] = root_dict[tvdb_name] + ',' + season_url for root_name, season_url in root_dict.iteritems(): _common.add_show(root_name, SITE, 'seasons', season_url) _common.set_view('tvshows')
def masterlist(): master_dict = {} master_db = [] master_doubles = [] master_data = _connection.getURL(SHOWS) master_tree = BeautifulSoup(master_data, 'html.parser', parse_only = SoupStrainer('ul')) master_menu = master_tree.find_all('ul', class_ = 'shows_list')[1].find_all('a') master_menu2 = master_tree.find('li', 'nav_item_3').find_all('a', href = re.compile('[^#]+')) for master_item in master_menu: master_name = master_item.find('span').string master_doubles.append(master_name) season_url = master_item['href'] master_db.append((master_name, SITE, 'seasons', season_url)) for master_item in master_menu2: master_name = master_item.string if master_name not in master_doubles and master_name.split(' with ')[0] not in master_doubles: season_url = master_item['href'] _common.add_show(master_name, SITE, 'seasons', season_url) return master_db
def movielist(url = _common.args.url): root_dict = {} root_url = url root_data = _connection.getURL(root_url) root_menu = simplejson.loads(root_data)['Entries'] for root_item in root_menu: if _addoncompat.get_setting('hide_clip_only') == 'false' or not root_item.get('ClipsOnly', False): root_name = root_item['Title'] season_url = FULLEPISODES % root_item['ID'] showdata = _common.get_skelton_series(root_name, SITE, 'episodes', season_url) showdata[6] = root_item.get('ChannelArtTileWide', showdata[6]) showdata[7] = root_item.get('ChannelArtTileLarge', showdata[7]) showdata[8] = root_item.get('ChannelArtLandscape', showdata[8]) showdata[9] = root_item.get('ReleaseYear', showdata[9]) showdata[11] = root_item.get('ReleaseYear', showdata[11]) showdata[13] = root_item.get('Genre', showdata[13]) showdata[15] = root_item.get('Description', showdata[15]) if root_item.get('ReleaseYear', None): showdata[15] = u"%s \n(%s, %s)" % (showdata[15], showdata[13], root_item.get('ReleaseYear')) _common.add_show(root_name, SITE, 'episodes', season_url, showdata = showdata) _common.set_view('root')
def rootlist(): root_menu = simplejson.loads(_connection.getURL(SHOWS)) for root_item in root_menu['items']: root_name = _common.smart_utf8(root_item['title']) _common.add_show(root_name, SITE, 'seasons', urllib.quote_plus(root_name)) _common.set_view('tvshows')