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


Python CParsingHelper.getNormalizeStr方法代码示例

本文整理汇总了Python中Plugins.Extensions.IPTVPlayer.libs.pCommon.CParsingHelper.getNormalizeStr方法的典型用法代码示例。如果您正苦于以下问题:Python CParsingHelper.getNormalizeStr方法的具体用法?Python CParsingHelper.getNormalizeStr怎么用?Python CParsingHelper.getNormalizeStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugins.Extensions.IPTVPlayer.libs.pCommon.CParsingHelper的用法示例。


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

示例1: __init__

# 需要导入模块: from Plugins.Extensions.IPTVPlayer.libs.pCommon import CParsingHelper [as 别名]
# 或者: from Plugins.Extensions.IPTVPlayer.libs.pCommon.CParsingHelper import getNormalizeStr [as 别名]
    def __init__(self, session, params={}):
        # params: vk_title, movie_title
        self.session = session
        Screen.__init__(self, session)
        
        self.params = params
        self.params['login']    = config.plugins.iptvplayer.opensuborg_login.value
        self.params['password'] = config.plugins.iptvplayer.opensuborg_password.value
        
        self.searchPattern = CParsingHelper.getNormalizeStr( self.params.get('movie_title', '') )
        
        # try to guess season and episode number
        try:
            tmp = CParsingHelper.getSearchGroups(self.searchPattern + ' ', 's([0-9]+?)e([0-9]+?)[^0-9]', 2)
            self.episodeData = {'season': int(tmp[0]), 'episode':int(tmp[1])}
        except:
            self.episodeData = {'season':-1, 'episode':-1}

        self.onShown.append(self.onStart)
        self.onClose.append(self.__onClose)
        
        self.subProvider = OpenSubOrgProvider()
        
        self["title"]         = Label(" ")
        self["console"]       = Label(" ")
        
        self["label_red"]     = Label(_("Cancel"))
        self["label_yellow"]  = Label(_("Move group"))
        self["label_green"]   = Label(_("Apply"))
        
        self["icon_red"]     = Cover3()
        self["icon_yellow"]  = Cover3()
        self["icon_green"]   = Cover3()
        
        self["list"] = IPTVMainNavigatorList()
        self["list"].connectSelChanged(self.onSelectionChanged)
        
        self["actions"] = ActionMap(["ColorActions", "SetupActions", "WizardActions", "ListboxActions"],
            {
                "cancel": self.keyExit,
                "ok"    : self.keyOK,
                "red"   : self.keyRed,
                "yellow": self.keyYellow,
                "green" : self.keyGreen,
            }, -2)
        
        self.iconPixmap = {}
        for icon in ['red', 'yellow', 'green']:
            self.iconPixmap[icon] = LoadPixmap(GetIconDir(icon+'.png'))
            
        self.movieTitle = ''
        self.stackList  = []
        self.stackItems = []
        
        self.defaultLanguage = GetDefaultLang()
    
        self.listMode = False
        self.downloadedSubFilePath = ''
        self.loginPassed = False
        self.tmpItem = None
开发者ID:a4tech,项目名称:iptvplayer-for-e2,代码行数:62,代码来源:iptvsubdownloader.py


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