当前位置: 首页>>代码示例>>Python>>正文


Python common.get_window_title函数代码示例

本文整理汇总了Python中resources.lib.common.get_window_title函数的典型用法代码示例。如果您正苦于以下问题:Python get_window_title函数的具体用法?Python get_window_title怎么用?Python get_window_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_window_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: list_shows

def list_shows(params):
    """Build shows listing"""
    shows = []

    if params.next == 'list_shows_1':

        all_video = common.ADDON.get_localized_string(30701)

        shows.append({
            'label': common.GETTEXT('All videos'),
            'url': common.PLUGIN.get_url(
                module_path=params.module_path,
                module_name=params.module_name,
                action='replay_entry',
                next='list_videos_1',
                page=1,
                all_video=all_video,
                window_title=all_video
            )
        })
    
    return common.PLUGIN.create_listing(
        shows,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:29,代码来源:tf1thematiques.py

示例2: root

def root(params):
    """Add Replay and Live in the listing"""
    modes = []

    # Add Replay
    modes.append({
        'label': 'Replay',
        'url': common.PLUGIN.get_url(
            module_path=params.module_path,
            module_name=params.module_name,
            action='replay_entry',
            next='list_shows_1',
            category='%s Replay' % params.channel_name.upper(),
            window_title='%s Replay' % params.channel_name
        )
    })

    return common.PLUGIN.create_listing(
        modes,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:25,代码来源:uktvplay.py

示例3: list_shows

def list_shows(params):
    """Build shows listing"""
    shows = []

    if params.next == 'list_shows_1':

        for category_url, category_name in CATEGORIES.iteritems():

            shows.append({
                'label': category_name,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='replay_entry',
                    category_url=category_url,
                    category_name=category_name,
                    page='0',
                    next='list_videos_1',
                    window_title=category_name
                )
            })

    return common.PLUGIN.create_listing(
        shows,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:30,代码来源:publicsenat.py

示例4: root

def root(params):
    """Add modes in the listing"""
    modes = []

    for category_name, category_url in CATEGORIES.iteritems():

        if 'series' in category_url or 'films' in category_url:
            next_value = 'list_shows_films_series_1'
        else:
            next_value = 'list_shows_emissions_1'

        modes.append({
            'label': category_name,
            'url': common.PLUGIN.get_url(
                module_path=params.module_path,
                module_name=params.module_name,
                action='website_entry',
                category_url=category_url,
                category_name=category_name,
                next=next_value,
                window_title=category_name
            )
        })

    return common.PLUGIN.create_listing(
        modes,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_LABEL,
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:32,代码来源:allocine.py

示例5: root

def root(params):
    """Add modes in the listing"""
    modes = []

    category_title = common.GETTEXT('All videos')

    modes.append({
        'label': category_title,
        'url': common.PLUGIN.get_url(
            module_path=params.module_path,
            module_name=params.module_name,
            action='website_entry',
            next='list_videos_1',
            title=category_title,
            page='1',
            window_title=category_title
        )
    })

    return common.PLUGIN.create_listing(
        modes,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_LABEL,
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:27,代码来源:autoplus.py

示例6: list_videos_categories

def list_videos_categories(params):
    """Build videos categories listing"""
    videos_categories = []
    url = ''.join((
        params.program_url,
        '/videos'))
    program_html = utils.get_webcontent(url)
    program_soup = bs(program_html, 'html.parser')

    filters_1_soup = program_soup.find(
        'ul',
        class_='filters_1')
    if filters_1_soup is not None:
        for li in filters_1_soup.find_all('li'):
            category_title = li.get_text().encode('utf-8')
            category_id = li.find('a')['data-filter'].encode('utf-8')

            # Get Last Page of each categorie
            # Get First page :
            url_first_page = ''.join((
                params.program_url,
                '/videos',
                '?filter=',
                category_id))
            program_first_page_html = utils.get_webcontent(url_first_page)
            program_first_page_soup = bs(
                program_first_page_html, 'html.parser')
            # Get Last page :
            last_page = '0'
            if program_first_page_soup.find(
                    'a', class_='icon i-chevron-right-double trackXiti'
            ) is not None:
                last_page = program_first_page_soup.find(
                    'a',
                    class_='icon i-chevron-right-double trackXiti'
                ).get('href').rsplit('/')[-1].split('?')[0]

            videos_categories.append({
                'label': category_title,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='replay_entry',
                    program_url=params.program_url,
                    page='1',
                    last_page=last_page,
                    next='list_videos',
                    window_title=category_title,
                    category_id=category_id
                )
            })
    return common.PLUGIN.create_listing(
        videos_categories,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:59,代码来源:tf1.py

示例7: root

def root(params):
    """Add modes in the listing"""
    modes = []

    category_title = common.GETTEXT('All videos')
    category_url = URL_ROOT + '/search?types=video&page=%s&sort=-origin_date'

    modes.append({
        'label': category_title,
        'url': common.PLUGIN.get_url(
            module_path=params.module_path,
            module_name=params.module_name,
            action='website_entry',
            next='list_videos_1',
            title=category_title,
            category_url=category_url,
            page='1',
            window_title=category_title
        )
    })

    categories_html = utils.get_webcontent(
        URL_ROOT + '/search?types=video')
    categories_soup = bs(categories_html, 'html.parser')
    categories = categories_soup.find(
        'div', class_='facet-group facet-group--tags open').find_all(
            'label')

    for category in categories:
        category_title = category.get_text().strip().encode('utf-8')
        category_id = category.find('input').get('value')
        category_url = URL_ROOT + '/search?types=video' + \
            '&tags=%s&sort=-origin_date' % category_id + \
            '&page=%s'

        modes.append({
            'label': category_title,
            'url': common.PLUGIN.get_url(
                module_path=params.module_path,
                module_name=params.module_name,
                action='website_entry',
                next='list_videos_1',
                title=category_title,
                category_url=category_url,
                page='1',
                window_title=category_title
            )
        })

    return common.PLUGIN.create_listing(
        modes,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:56,代码来源:notrehistoirech.py

示例8: list_shows

def list_shows(params):
    """Build categories listing"""
    shows = []

    if params.next == 'list_shows_1':
        file_path = utils.download_catalog(
            URL_PROGRAMS,
            '%s_programs.html' % params.channel_name)
        programs_html = open(file_path).read()

        programs_soup = bs(programs_html, 'html.parser')
        list_js = programs_soup.find_all("script")
        # 7ème script contient la liste des categories au format json
        json_categories = list_js[6].prettify().replace(
            '</script>', ''
        ).replace(
            '<script>', ''
        ).replace(
            'var programList = ', ''
        ).replace(
            '\n', ''
        ).replace(
            '\r', ''
        ).replace(
            ',]', ']')
        json_categories_jsonparser = json.loads(json_categories)

        for category in json_categories_jsonparser["programmings"]:
            category_name = category["title"]
            category_img = URL_ROOT + category["image"]
            category_url = URL_ROOT + '/programma/' + category["description"]

            shows.append({
                'label': category_name,
                'thumb': category_img,
                'fanart': category_img,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='replay_entry',
                    next='list_videos_cat',
                    category_url=category_url,
                    window_title=category_name,
                    category_name=category_name,
                )
            })

    return common.PLUGIN.create_listing(
        shows,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:55,代码来源:bvn.py

示例9: list_shows

def list_shows(params):
    """Build shows listing"""
    shows = []

    if params.next == 'list_shows_1':

        all_video = common.ADDON.get_localized_string(30701)

        shows.append({
            'label': common.GETTEXT('All videos'),
            'url': common.PLUGIN.get_url(
                module_path=params.module_path,
                module_name=params.module_name,
                action='replay_entry',
                next='list_videos_cat',
                category_id=0,
                all_video=all_video,
                window_title=all_video
            )
        })

        file_path = utils.download_catalog(
            URL_CATEGORIES_NHK % (params.channel_name, get_api_key(params)),
            '%s_categories.json' % (params.channel_name)
        )
        file_categories = open(file_path).read()
        json_parser = json.loads(file_categories)

        for category in json_parser["vod_categories"]:

            name_category = category["name"].encode('utf-8')
            category_id = category["category_id"]

            shows.append({
                'label': name_category,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='replay_entry',
                    next='list_videos_cat',
                    category_id=category_id,
                    name_category=name_category,
                    window_title=name_category
                )
            })

    return common.PLUGIN.create_listing(
        shows,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:54,代码来源:nhkworld.py

示例10: root

def root(params):
    """Add modes in the listing"""
    modes = []

    list_categories_html = utils.get_webcontent(URL_ROOT)
    list_categories_soup = bs(list_categories_html, 'html.parser')
    list_categories = list_categories_soup.find(
        'ul', class_='nav').find_all('a', class_='dropdown-toggle')

    for category in list_categories:

        if 'emissions' in category.get('href'):
            category_title = category.get_text().strip()
            category_url = URL_ROOT + category.get('href')

            modes.append({
                'label': category_title,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='website_entry',
                    next='list_shows_1',
                    title=category_title,
                    category_url=category_url,
                    window_title=category_title
                )
            })

        elif 'videos' in category.get('href'):
            category_title = category.get_text().strip()
            category_url = URL_ROOT + category.get('href')

            modes.append({
                'label': category_title,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='website_entry',
                    next='list_videos_1',
                    title=category_title,
                    page='1',
                    category_url=category_url,
                    window_title=category_title
                )
            })

    return common.PLUGIN.create_listing(
        modes,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_LABEL,
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:54,代码来源:culturepub.py

示例11: root

def root(params):
    modes = []

    if params.channel_name == 'skynews':
        next_value = 'list_videos_youtube'
    elif params.channel_name == 'skysports':
        next_value = 'list_shows_sports'

    if params.next == "replay_entry":
        params['next'] = next_value
        params['page'] = '1'
        return channel_entry(params)

    # Add Replay
    modes.append({
        'label': 'Replay',
        'url': common.PLUGIN.get_url(
            module_path=params.module_path,
            module_name=params.module_name,
            action='replay_entry',
            next=next_value,
            page='1',
            category='%s Replay' % params.channel_name.upper(),
            window_title='%s Replay' % params.channel_name.upper()
        ),
    })

    # Add Live
    if params.channel_name == 'skynews':
        modes.append({
            'label': common.GETTEXT('Live TV'),
            'url': common.PLUGIN.get_url(
                module_path=params.module_path,
                module_name=params.module_name,
                action='replay_entry',
                next='live_cat',
                category='%s Live TV' % params.channel_name.upper(),
                window_title='%s Live TV' % params.channel_name.upper()
            ),
        })

    return common.PLUGIN.create_listing(
        modes,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:49,代码来源:sky.py

示例12: list_shows

def list_shows(params):
    """Build categories listing"""
    shows = []

    if params.next == 'list_shows_1':

        # Get Emission :
        root_html = utils.get_webcontent(
            URL_EMISSION)
        root_soup = bs(root_html, 'html.parser')
        emissions_soup = root_soup.find_all(
            'div', class_="fusion-column-wrapper")

        for emission in emissions_soup:

            if emission.find('h3'):
                emission_name = emission.find('h3').find(
                    'a').get_text().encode('utf-8')
                emission_img = emission.find('img').get(
                    'src').encode('utf-8')
                emission_url = emission.find('a').get(
                    'href').encode('utf-8')

                if 'http' not in emission_url:
                    emission_url = URL_ROOT + '/' + emission_url

                shows.append({
                    'label': emission_name,
                    'thumb': emission_img,
                    'url': common.PLUGIN.get_url(
                        module_path=params.module_path,
                        module_name=params.module_name,
                        action='replay_entry',
                        emission_url=emission_url,
                        category_name=emission_name,
                        next='list_videos_1',
                        window_title=emission_name
                    )
                })

    return common.PLUGIN.create_listing(
        shows,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:48,代码来源:icitelevision.py

示例13: root

def root(params):
    """Add modes in the listing"""
    modes = []

    list_categories_html = utils.get_webcontent(URL_ROOT)
    list_categories_soup = bs(list_categories_html, 'html.parser')
    list_categories = list_categories_soup.find(
        'ul', class_='nav navbar-nav').find_all('a')

    for category in list_categories:

        category_title = category.get_text()
        category_url = URL_ROOT + category.get('href')

        value_next = ''
        if 'taratata' in category.get('href'):
            value_next = 'list_shows_taratata'
        elif 'artistes' in category.get('href'):
            value_next = 'list_shows_artistes_1'
        elif 'bonus' in category.get('href'):
            value_next = 'list_shows_bonus'
        else:
            return None

        modes.append({
            'label': category_title,
            'url': common.PLUGIN.get_url(
                module_path=params.module_path,
                module_name=params.module_name,
                action='website_entry',
                next=value_next,
                title=category_title,
                page='1',
                category_url=category_url,
                window_title=category_title
            )
        })

    return common.PLUGIN.create_listing(
        modes,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_LABEL,
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:46,代码来源:taratata.py

示例14: list_shows

def list_shows(params):
    """Build shows listing"""
    shows = []
    if params.next == 'list_shows_1':
        file_path = utils.download_catalog(
            URL_REPLAY,
            params.channel_name + '.html')
        root_html = open(file_path).read()
        root_soup = bs(root_html, 'html.parser')

        categories_soup = root_soup.find(
            'div',
            class_='nav-programs'
        )

        for category in categories_soup.find_all('a'):
            category_name = category.find(
                'span').get_text().encode('utf-8').replace(
                '\n', ' ').replace('\r', ' ').rstrip('\r\n')
            category_hash = common.sp.md5(category_name).hexdigest()

            url = category.get('href').encode('utf-8')

            shows.append({
                'label': category_name,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='replay_entry',
                    category_hash=category_hash,
                    next='list_videos_cat',
                    url=url,
                    window_title=category_name,
                    category_name=category_name,
                )
            })

    return common.PLUGIN.create_listing(
        shows,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:45,代码来源:numero23.py

示例15: list_shows

def list_shows(params):
    """Build categories listing"""
    shows = []

    # Get categories :
    file_path = utils.download_catalog(
        URL_ROOT_BRF,
        '%s_categories.html' % (
            params.channel_name))
    root_html = open(file_path).read()
    root_soup = bs(root_html, 'html.parser')

    menu_soup = root_soup.find('ul', class_="off-canvas-list")
    categories_soup = menu_soup.find_all('a')

    for category in categories_soup:

        category_name = category.get_text().encode('utf-8')
        category_url = category.get('href')

        if 'http' in category_url:
            shows.append({
                'label': category_name,
                'url': common.PLUGIN.get_url(
                    module_path=params.module_path,
                    module_name=params.module_name,
                    action='replay_entry',
                    category_url=category_url,
                    page='1',
                    category_name=category_name,
                    next='list_videos',
                    window_title=category_name
                )
            })

    return common.PLUGIN.create_listing(
        shows,
        sort_methods=(
            common.sp.xbmcplugin.SORT_METHOD_UNSORTED,
            common.sp.xbmcplugin.SORT_METHOD_LABEL
        ),
        category=common.get_window_title()
    )
开发者ID:Lunatixz,项目名称:repo-plugins,代码行数:43,代码来源:brf.py


注:本文中的resources.lib.common.get_window_title函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。