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


Python twagenthelper.TwAgentHelper类代码示例

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


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

示例1: getRedirectedUrl

def getRedirectedUrl():
	def getUrl(result, err=False):
		if not err:
			global redirected_url
			redirected_url = result

	tw_agent_hlp = TwAgentHelper(redir_agent=False)
	tw_agent_hlp.getRedirectedUrl(BASE_URL).addCallback(getUrl).addErrback(getUrl, True)
开发者ID:n3wb13,项目名称:OpenNfrGui-5.0-1,代码行数:8,代码来源:myfreemp3.py

示例2: __init__

	def __init__(self, session, title, episode, url):
		self.serieUrl = url
		self.Title = title
		self.episode = episode
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0" : self.closeAll,
			"ok" : self.keyOK,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label("watchseries-online")
		self['leftContentTitle'] = Label(_("Stream Selection"))
		self['ContentTitle'] = Label(_("Stream Selection"))
		self['name'] = Label(self.Title)

		self.streamList = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml
		self.keyLocked = True
		self.onLayoutFinish.append(self.loadPage)
		self.tw_agent_hlp = TwAgentHelper()
开发者ID:schleichdi2,项目名称:OpenNfr_E2_Gui-5.3,代码行数:31,代码来源:watchseriesonline.py

示例3: __init__

	def __init__(self, session, Title, Hoster, Data):
		self.Title = Title
		self.Hoster = Hoster
		self.Data = Data
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath

		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListScreen.xml"

		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"ok"	: self.keyOK,
			"0" : self.closeAll,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label("alluc.to / Filter: %s" % config.mediaportal.alluc_country.value)
		self['ContentTitle'] = Label("Streamlist %s" %self.Title)

		self.keyLocked = True
		self.tw_agent_hlp = TwAgentHelper()
		self.filmliste = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml
		self.onLayoutFinish.append(self.loadPage)
开发者ID:n3wb13,项目名称:OpenNfrGui-5.0-1,代码行数:31,代码来源:alluc.py

示例4: __init__

    def __init__(self, session):
        self.plugin_path = mp_globals.pluginPath
        self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
        path = "%s/%s/defaultGenreScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
        if not fileExists(path):
            path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreen.xml"
        with open(path, "r") as f:
            self.skin = f.read()
            f.close()
        MPScreen.__init__(self, session)

        self["actions"] = ActionMap(
            ["MP_Actions"], {"ok": self.keyOK, "0": self.closeAll, "cancel": self.keyCancel}, -1
        )

        self["title"] = Label(BASE_NAME)
        self["ContentTitle"] = Label("Genre:")
        self.keyLocked = True
        self.suchString = ""

        self.tw_agent_hlp = TwAgentHelper(followRedirect=True)
        self.filmliste = []
        self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
        self["liste"] = self.ml

        self.onLayoutFinish.append(self.layoutFinished)
开发者ID:schleichdi2,项目名称:OpenNfr_E2_Gui-5.3,代码行数:26,代码来源:rlsto.py

示例5: __init__

	def __init__(self, session, streamFilmLink, streamName):
		self.streamFilmLink = streamFilmLink
		self.streamName = streamName
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultGenreScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"ok" : self.keyOK,
			"0" : self.closeAll,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label("MegaSkanks.com")
		self['name'] = Label(self.streamName)
		self['ContentTitle'] = Label("Streams:")

		self.tw_agent_hlp = TwAgentHelper(redir_agent=True)
		self.keyLocked = True
		self.filmliste = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.onLayoutFinish.append(self.loadPage)
开发者ID:n3wb13,项目名称:OpenNfrGui-5.0-1,代码行数:31,代码来源:megaskanks.py

示例6: __init__

	def __init__(self, session, streamFilmLink, streamName):
		self.session = session
		self.streamFilmLink = streamFilmLink
		self.streamName = streamName

		path = "/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins/%s/XXXGenreScreen.xml" % config.mediaportal.skin.value
		if not fileExists(path):
			path = "/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins/original/XXXGenreScreen.xml"
		print path
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		Screen.__init__(self, session)

		self["actions"]  = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", "NumberActions", "MenuActions", "EPGSelectActions"], {
			"ok"    : self.keyOK,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label("G-Stream.in")
		self['name'] = Label('Bitte warten...')
		self['coverArt'] = Pixmap()

		self.tw_agent_hlp = TwAgentHelper()
		self.keyLocked = True
		self.filmliste = []
		self.chooseMenuList = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self.chooseMenuList.l.setFont(0, gFont('mediaportal', 23))
		self.chooseMenuList.l.setItemHeight(25)
		self['genreList'] = self.chooseMenuList

		self.onLayoutFinish.append(self.loadPage)
开发者ID:Wuschi6,项目名称:MediaPortal,代码行数:33,代码来源:gstreaminxxx.py

示例7: __init__

	def __init__(self, session, url, name, which):
		self.url = url
		self.name = name
		self.which = which
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultGenreScreenCover.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreenCover.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"ok"	: self.keyOK,
			"0" : self.closeAll,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label(m4k)
		self['ContentTitle'] = Label(_("Stream Selection"))


		self.coverUrl = None
		self.base_url = m4k_url
		self.tw_agent_hlp = TwAgentHelper(redir_agent=True)
		self.keyLocked = True
		self.list = []
		self.keckse = {}
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.onLayoutFinish.append(self.loadPage)
开发者ID:n3wb13,项目名称:OpenNfrGui-5.0-1,代码行数:34,代码来源:movie4k.py

示例8: get_stream_link

		else:
			get_stream_link(self.session).check_link(url, self.got_link)

	def wtfisthis(self, data):
		url = re.search('<a href="(http://wtf-is-this.xyz/\?r=.*?)"', data, re.S)
		if url:
			url = url.group(1)
			self.tw_agent_hlp = TwAgentHelper()
开发者ID:n3wb13,项目名称:OpenNfrGui-5.0-1,代码行数:8,代码来源:wtfvideofree.py

示例9: wtfisthis

	def wtfisthis(self, data):
		url = re.search('<a href="(http://wtf-is-this.xyz/\?r=.*?)"', data, re.S)
		if url:
			url = url.group(1)
			self.tw_agent_hlp = TwAgentHelper()
			self.tw_agent_hlp.getRedirectedUrl(url).addCallback(self.wtfisthisdata).addErrback(self.dataError)
		else:
			self.adfly(data)
开发者ID:schleichdi2,项目名称:OpenNfr_E2_Gui-5.3,代码行数:8,代码来源:wtfvideofree.py

示例10: keyOK

	def keyOK(self):
		if self.keyLocked:
			return
		streamid = self['liste'].getCurrent()[0][1]
		if streamid == None:
			return
		url = "%s/en/out/%s" % (BASE_URL, streamid)
		self.tw_agent_hlp = TwAgentHelper()
		self.tw_agent_hlp.getRedirectedUrl(url).addCallback(self.test_streamLink).addErrback(self.dataError)
开发者ID:schleichdi2,项目名称:OpenNfr_E2_Gui-5.3,代码行数:9,代码来源:pornhive.py

示例11: getRealdebrid

	def getRealdebrid(self, loop=False):
		self.agent = TwAgentHelper(headers={'User-Agent': 'E2 MediaPortal/%s' % self.mpversion,
											'Content-Type': 'application/x-www-form-urlencoded',
											'Authorization': 'Bearer %s' % self.raccesstoken
											})
		if self.calltype == 'link':
			self.getLink(loop)
		elif self.calltype == 'user':
			self.getUserInfo(loop)
		else:
			self.closeall()
开发者ID:schleichdi2,项目名称:OpenNfr_E2_Gui-5.3,代码行数:11,代码来源:realdebrid.py

示例12: __init__

	def __init__(self, session, Link, Name):
		self.session = session
		self.Link = Link
		self.Name = Name
		self.plugin_path = mp_globals.pluginPath
		self.skin_path =  mp_globals.pluginPath + "/skins"

		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + "/original/defaultListScreen.xml"

		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		Screen.__init__(self, session)

		self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", "NumberActions", "MenuActions", "EPGSelectActions"], {
		"ok"	: self.keyOK,
		"cancel": self.keyCancel,
		"up" : self.keyUp,
		"down" : self.keyDown,
		"right" : self.keyRight,
		"left" : self.keyLeft,
		"nextBouquet" : self.keyPageUp,
		"prevBouquet" : self.keyPageDown
		}, -1)

		self['title'] = Label("Arte Mediathek")
		self['ContentTitle'] = Label("Auswahl: %s" % self.Name)
		self['name'] = Label("")
		self['F1'] = Label("Exit")
		self['F2'] = Label("")
		self['F3'] = Label("")
		self['F4'] = Label("")
		self['F2'].hide()
		self['F3'].hide()
		self['F4'].hide()
		self['coverArt'] = Pixmap()
		self['Page'] = Label("Page: ")
		self['page'] = Label("")
		self['handlung'] = Label("")

		self.keyLocked = True
		self.filmliste = []
		self.tw_agent_hlp = TwAgentHelper()
		self.chooseMenuList = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self.chooseMenuList.l.setFont(0, gFont('mediaportal', 23))
		self.chooseMenuList.l.setItemHeight(25)
		self['liste'] = self.chooseMenuList
		self.page = 0
		self.onLayoutFinish.append(self.loadPage)
开发者ID:Wuschi6,项目名称:MediaPortal,代码行数:52,代码来源:arte.py

示例13: __init__

	def __init__(self, session, filmUrl, filmName, imageLink):
		self.session = session
		self.filmUrl = filmUrl
		self.filmName = filmName
		self.imageUrl = imageLink

		self.plugin_path = mp_globals.pluginPath
		self.skin_path =  mp_globals.pluginPath + "/skins"

		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + "/original/defaultListScreen.xml"

		print path
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		Screen.__init__(self, session)

		self["actions"]  = ActionMap(["OkCancelActions", "ShortcutActions", "EPGSelectActions", "WizardActions", "ColorActions", "NumberActions", "MenuActions", "MoviePlayerActions", "InfobarSeekActions"], {
			"red" 		: self.keyTxtPageUp,
			"blue" 		: self.keyTxtPageDown,
			"green" 	: self.keyTrailer,
			"ok"    	: self.keyOK,
			"info" 		: self.keyTMDbInfo,
			"cancel"	: self.keyCancel
		}, -1)

		self['title'] = Label(IS_Version)
		self['ContentTitle'] = Label("Stream Auswahl")
		self['coverArt'] = Pixmap()
		self['handlung'] = ScrollLabel("")
		self['name'] = Label(filmName)
		self['Page'] = Label("")
		self['page'] = Label("")
		self['F1'] = Label("Text-")
		self['F2'] = Label("")
		self['F3'] = Label("")
		self['F4'] = Label("Text+")

		self.trailerId = None
		self.tw_agent_hlp = TwAgentHelper()
		self.streamListe = []
		self.streamMenuList = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self.streamMenuList.l.setFont(0, gFont('mediaportal', 24))
		self.streamMenuList.l.setItemHeight(25)
		self['liste'] = self.streamMenuList
		self.keyLocked = True
		self.onLayoutFinish.append(self.loadPage)
开发者ID:Wuschi6,项目名称:MediaPortal,代码行数:50,代码来源:streamit.py

示例14: __init__

	def __init__(self, session, Link, Name, mode):
		self.mode = mode
		self.Link = Link
		self.Name = Name
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath

		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListScreen.xml"

		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		MPScreen.__init__(self, session)
		ThumbsHelper.__init__(self)

		self["actions"] = ActionMap(["MP_Actions"], {
			"ok" : self.keyOK,
			"0" : self.closeAll,
			"cancel" : self.keyCancel,
			"5" : self.keyShowThumb,
			"up" : self.keyUp,
			"down" : self.keyDown,
			"right" : self.keyRight,
			"left" : self.keyLeft,
			"nextBouquet" : self.keyPageUp,
			"prevBouquet" : self.keyPageDown,
			"green" : self.keyPageNumber
		}, -1)

		self['title'] = Label("GStream.to")
		self['ContentTitle'] = Label(self.Name)
		self['F2'] = Label(_("Page"))

		self['Page'] = Label(_("Page:"))
		self.keyLocked = True
		self.page = 1
		self.lastpage = 1

		self.tw_agent_hlp = TwAgentHelper(redir_agent=True)
		self.urlRedirected = ''
		self.filmliste = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.onLayoutFinish.append(self.loadPage)
开发者ID:n3wb13,项目名称:OpenNfrGui-5.0-1,代码行数:48,代码来源:gstreaminxxx.py

示例15: IStreamStreams

class IStreamStreams(Screen, ConfigListScreen):
    def __init__(self, session, filmUrl, filmName, imageLink):
        self.session = session
        self.filmUrl = filmUrl
        self.filmName = filmName
        self.imageUrl = imageLink

        self.plugin_path = mp_globals.pluginPath
        self.skin_path = mp_globals.pluginPath + "/skins"

        path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
        if not fileExists(path):
            path = self.skin_path + "/original/defaultListScreen.xml"

        print path
        with open(path, "r") as f:
            self.skin = f.read()
            f.close()

        Screen.__init__(self, session)

        self["actions"] = ActionMap(
            [
                "OkCancelActions",
                "ShortcutActions",
                "EPGSelectActions",
                "WizardActions",
                "ColorActions",
                "NumberActions",
                "MenuActions",
                "MoviePlayerActions",
                "InfobarSeekActions",
            ],
            {
                "red": self.keyTxtPageUp,
                "blue": self.keyTxtPageDown,
                "ok": self.keyOK,
                "info": self.keyTMDbInfo,
                "cancel": self.keyCancel,
            },
            -1,
        )

        self["title"] = Label(IS_Version)
        self["ContentTitle"] = Label("Stream Auswahl")
        self["coverArt"] = Pixmap()
        self["handlung"] = ScrollLabel("")
        self["name"] = Label(filmName)
        self["Page"] = Label("")
        self["page"] = Label("")
        self["F1"] = Label("Text-")
        self["F2"] = Label("")
        self["F3"] = Label("")
        self["F4"] = Label("Text+")

        self.tw_agent_hlp = TwAgentHelper()
        self.streamListe = []
        self.streamMenuList = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
        self.streamMenuList.l.setFont(0, gFont("mediaportal", 24))
        self.streamMenuList.l.setItemHeight(25)
        self["liste"] = self.streamMenuList
        self.keyLocked = True
        self.onLayoutFinish.append(self.loadPage)

    def loadPage(self):
        print "loadPage:"
        streamUrl = self.filmUrl
        # print "FilmUrl: %s" % self.filmUrl
        # print "FilmName: %s" % self.filmName
        self.tw_agent_hlp.getWebPage(self.parseData, self.dataError, streamUrl, False)

    def parseData(self, data):
        print "parseData:"
        streams = re.findall('a class="hoster-button.*?href="(.*?)".*?title=".*?\[(.*?)\](.*?)"', data)
        mdesc = re.search('class="desc">(.*?)<br />', data, re.S)
        if mdesc:
            print "Descr. found"
            desc = mdesc.group(1).strip()
        else:
            desc = "Keine weiteren Info's !"

        self.streamListe = []
        if streams:
            print "Streams found"
            for (isUrl, isStream, streamPart) in streams:
                if re.match(
                    ".*?(putlocker|sockshare|streamclou|xvidstage|filenuke|movreel|nowvideo|xvidstream|uploadc|vreer|MonsterUploads|Novamov|Videoweed|Divxstage|Ginbig|Flashstrea|Movshare|yesload|faststream|Vidstream|PrimeShare|flashx|Divxmov|Putme|Click.*?Play|BitShare)",
                    isStream,
                    re.S | re.I,
                ):
                    # print isUrl
                    # print isStream,streamPart
                    self.streamListe.append((isStream, isUrl, streamPart))
                else:
                    print "No supported hoster:"
                    print isStream
                    print isUrl
        else:
            print "No Streams found"
            self.streamListe.append(("No streams found!", "", ""))
#.........这里部分代码省略.........
开发者ID:noppes0608,项目名称:MediaPortal,代码行数:101,代码来源:iStreamws.py


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