Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
Ch-_c@s2ddlmZmZmZmZddlmZddlm	Z	m
Z
ddlmZm
Z
mZmZmZmZddlmZddlmZddlmZddlmZdd	lZdd	lZdd	lZdd
lmZmZd„Z d„Z!d
e
fd„ƒYZ"de	fd„ƒYZ#d	S(iÿÿÿÿ(tconfigtConfigSelectiontConfigYesNotgetConfigListEntry(tTranslateTXT(t	CHostBasetCBaseHostClass(tprintDBGtprintExct
MergeDictstrmtformatBytestCSelOneLink(tstrwithmeta(tgetDirectM3U8Playlist(tph(tloadsN(tdatetimet	timedeltacCs
g}|S(N((t
optionList((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyt
GetConfigListscCsdS(Nshttp://redbull.tv/((((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytgettytul!stRedbullcBseZd„Zd„Zd„Zidd„Zdd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
d„Zdd
d
d„ZRS(cCshtj|idd6dd6ƒ|jjddƒ|_i|jd6|_d|_d	|_d
|_dS(Ns
redbull.tvthistorysredbull.tv.cookietcookietbrowsertchrometheadershttps://appletv.redbull.tv/shttp://redbull.tv/sJhttps://www.redbull.com/v3/resources/images/appicon/android-chrome-192.png(	Rt__init__tcmtgetDefaultHeadertHTTP_HEADERt
defaultParamstREDBULL_APItMAIN_URLtDEFAULT_ICON_URL(tself((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyR&s		cCsítdƒidd6tdƒd6|jdd6idd6tdƒd6|jd	d6idd6td
ƒd6|jdd6idd6tdƒd6|jd
d6idd6tdƒd6td6idd6tdƒd6g}|j||ƒdS(NsRedbull.listMaintexplore_itemtcategorytDiscoverttitlesproducts/discoverturltTVsproducts/tvtChannelssproducts/channelstCalendarsproducts/calendartsearchtSearchtsearch_itemtsearch_historysSearch history(Rt_R!tTruetlistsTab(R$tcItemtnextCategorytMAIN_CAT_TAB((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytlistMain/s
%%%%cCsUtdƒtjjd|ƒ}|jddƒ}|j|dƒ}|jƒdkrZdS|jtj|tj	ƒdƒ}g}t
ƒ}tj|ddƒ}	|	rQx¨|	D]}
|j|
ƒjd	dƒdjƒ}tj|
tj
ƒd}
|
|krq­n|j|
ƒ|s|}n|jt|i|d
6|d6|
d6ƒƒq­Wntj
j|ƒ}	|	rÑxe|	D]Z}
|
d}
|
|kr’qpn|j|
ƒ|jt|i|d
6|d6|
d6ƒƒqpWntj|d
dtjtjdƒfdƒ}xÉ|D]Á}|jtj|tjƒdƒ}
|jtj||jƒdƒ}|j|ƒ}|s|jddƒdjddƒd}n|jt|itd6|d
6|d6|
d6|d6ƒƒqWt|ƒdkr|jt|idd
6|d6|d6|d6ƒƒn@t|ƒdkrQ|d}|ji|d6ƒ|j|ƒndS(NsRedbull.handleSectionts</table>iitlinkis<center>s	</iframe>sVideo PlatformR&R(R)s<at>sarticles.phpsreadarticle.phps</a>t/iÿÿÿÿt.tgood_for_favticont	sub_items(R9(sarticles.phpsreadarticle.php(RRtSTRIP_HTML_COMMENT_REtsubtsplittcleanHtmlStrtlowert
getFullUrlR-tIMAGE_SRC_URI_REtsettfindalltstriptIFRAME_SRC_URI_REtaddtappendR	tchecktanyt
A_HREF_URI_REtreImgObjtrsplitR2tlentaddDirtupdate(R$R4R5tsectionttmptsTitletsIcontsubItemstuniquestiframestiframeR(titemR)R>tparams((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyt
handleSection=sT
"	
%
	2


2-
"")=5
cCs4|ikrt|jƒ}n|jj|||ƒS(N(tdictR RtgetPage(R$tbaseUrlt	addParamst	post_data((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyRamscCstj||jddƒ|ƒS(Ns&amp;t&(RREtreplace(R$R)tcurrUrl((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyREqscCsÇd}|jtj|dƒdƒ}|jtj|dƒdƒ}|rctj|dƒd}n|jtj|dƒdƒ}|jtj|dƒdƒ}t|ƒt|ƒkrÂ|}n|jtj|dƒdƒ}|r|rþ|d	|}q|}n|s/|jtj|d
ƒdƒ}n|sW|jtj|dƒdƒ}n|jtj|dƒdƒ}	|	r…|	}n|jtj|d
ƒdƒ}
|
rÊ|rÁ|
d|}qÊ|
}n|jtj|dƒdƒ}|r|d|}ntj|dƒd}|jƒrttjt	|ƒƒj
dƒ}
|ratdƒ|
d|}qštdƒ|
}n&|rš|r‘|d|}qš|}ni|d6|d6|d6|d6|d6}|S(NR8ssrc720=['"]([^'^"]+?)['"]isloadPage\(['"]([^'^"]+?)['"]sappletv.redbull.tv/(.*?)[\?/]s<title>([^>]+?)</title>s<label>([^>]+?)</label>s<label2>([^>]+?)</label2>s  s%accessibilityLabel=['"]([^'^"]+?)['"]sLabel=['"]([^'^"]+?)['"]s<summary>([^>]+?)</summary>s<subtitle>([^>]+?)</subtitle>s
sDuration: ([^'^"]+?)<s!<rightLabel>([^>]+?)</rightLabel>s%d/%m/%Y, %H:%Ms	Live at: R(R>tdescR)tcontent_type(tgetFullIconUrlRR-RERCRRtisdigitRt
fromtimestamptinttstrftimeR1(R$R]RhR>R)RiR(ttitle2ttitle3tsummarytsubtitlettimet	timestamptv_dateR^((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytgetInfotsR		""			)cCstdƒ|d|_dS(NsRedbull.listSubItemsR?(RtcurrList(R$R4((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytlistSubItems¬s
cCs‚tdƒ|j|dƒ\}}|s-gSd|krô|jtj|dƒdƒ}|jtj|dƒdƒ}|jtj|dƒdƒ}|s¾|jtj|dƒdƒ}ni|d	6|d
6dd6|dd6}|j|ƒng}tj|d
dƒ}	x*|	D]"}
|j	|
ƒ}|j
|ƒqWt|ƒr}|jit
dƒd	6|jd
6dd6|d6ƒntjd|ƒ}t|ƒs°tjd|ƒ}nx
|D]}d|ksÕd|kr·g}|jtj|dƒdƒ}
tj|ddƒ}	x*|	D]"}
|j	|
ƒ}|j
|ƒqWtj|ddƒ}	x*|	D]"}
|j	|
ƒ}|j
|ƒqXWt|ƒr¼|ji|
d	6|jd
6dd6|d6ƒq¼q·q·Wtj|ddƒ}x»|D]³}tj|ddƒ}	x•|	D]}
|j	|
ƒ}|dd+krK|d
|d
<d"|d<|j|ƒqþ|dd,kry|d
|d
<|j|ƒqþtd%|dƒqþWqÜWtj|d&d'ƒ}x‘|D]‰}g}tj|ddƒ}	x*|	D]"}
|j	|
ƒ}|j
|ƒq×Wt|ƒr¯|jid(d	6|jd
6dd6|d6ƒq¯q¯Wtj|d)d*ƒ}x*|D]"}
|j	|
ƒ}|j|ƒqXWdS(-NsRedbull.exploreItemR)s
<mediaURL>ssrc720=['"]([^'^"]+?)['"]isloadPage\(['"]([^'^"]+?)['"]s<label2>([^>]+?)</label2>s<title>([^>]+?)</title>R(R>R8Rhs<showcasePosters</showcasePoster>tShowcasetvideo_collectionR&R?s=(<collectionDivider.*?</collectionDivider>.*?<grid.*?</grid>)sW(<collectionDivider.*?</collectionDivider>.*?<collectionDivider.*?</collectionDivider>)s<shelfs<grids<sixteenByNinePosters</sixteenByNinePoster>s<moviePosters</moviePoster>s
<centerShelf>s</centerShelf>s
<actionButtons</actionButton>Ritproductst
collectionR%tcontenttpage_streamsContent Type unknown: %s s
<bottomShelf>s</bottomShelf>tRelateds<twoLines	</twoLine(R{R|(R}R~(RRaRjRR-RERCtaddVideoRHRvRLRRRSR1R#tre(R$R4tststdataR>R)R(R^tposterstdata3R]tdata2titem2tposter_titletd((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytexploreItem°s|
"&
5


6




3
cCs‹tdƒ|d}xp|D]h}|jddƒ}|dkrYd|d<|j|ƒq|d
kru|j|ƒqtd|ƒqWdS(NsRedbull.listVideoItemsR?RiR8R{R|R%R&R}R~sContent Type unknown: %s (sproductss
collection(scontentspage_stream(RtgetRSR€(R$R4tvideostvRi((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytlistVideoItemss



cCsH|jdtj|ƒ}t|idd6|d6ƒ}|j|ƒdS(Nssearch?q=%stlist_searchR&R)(R!turllibt
quote_plusR	tlistSearchItems(R$R4t
searchPatternt
searchTypeR)((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytlistSearchResultscCsëtdƒ|jddƒ}|j|dƒ\}}|s?dS|j|jjdƒtj|ddƒ}xy|D]q}|j|ƒ}|ddkr±d
|d<|j	|ƒqr|ddkrÑ|j
|ƒqrtd|dƒqrWdS(NsRedbull.listSearchItemstpageiR)s<twoLines	</twoLineRiR{R|R%R&R}R~sContent Type unknown: %s (sproductss
collection(scontentspage_stream(RR‹Rat
setMainUrlRtmetaRRHRvRSR€(R$R4R–R‚RƒR†R]R^((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyR’s


cCstd|dƒg}|j|dƒ\}}|s;gStj|dƒd}|r…|jt|dtdtdtdd	ƒƒn–|jtj|d
ƒdƒ}|j|ƒ\}}|sÃgStd|ƒtj|dƒd}|r|jt|dtdtdtdd	ƒƒn|S(NsRedbull.getLinksForVideo %sR)s<mediaURL>([^"]+?)<itcheckExttvariantChecktcheckContenttsortWithMaxBitrateiÿàõsloadPage\(['"]([^'^"]+?)['"]s&hostredbull.getLinksForVideo.data |%s|(RRaRR-textendRR2RE(R$R4turlsTabR‚RƒtvideoUrlR)((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pytgetLinksForVideo.s"..iR8cCs³tdƒtj|||||ƒ|jjddƒ}|jjddƒ}td||fƒg|_|dkr—|jidd6dd6dƒn|dkr¶|j|jƒnæ|dkrÕ|j	|jƒnÇ|d	krô|j
|jƒn¨|d
kr|j|jƒn‰|dkr_t|jƒ}|j
itd
6dd6ƒ|j|||ƒn=|dkr•|jidd6dd6dtdƒƒntƒtj|||ƒdS(NshandleService starttnameR8R&s*handleService: ||| name[%s], category[%s] ttypeR%R?RzRR-tsearch_next_pageR/R0RRhsType: (ssearchR£(RRt
handleServicetcurrItemR‹RwtNoneR7RŠRxRŽR’R`RTtFalseR•tlistsHistoryR1RtendHandleService(R$tindextrefreshR“R”R¡R&R4((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyR¤Fs0
	!*N(t__name__t
__module__RR7R_R¦RaRERvRxRŠRŽR•R’R R¤(((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyR$s				0	8		Q				tIPTVHostcBseZd„ZRS(cCstj|tƒtgƒdS(N(RRRR2(R$((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyRos(R¬R­R(((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyR®ms($tComponents.configRRRRt7Plugins.Extensions.IPTVPlayer.components.iptvplayerinitRR1t.Plugins.Extensions.IPTVPlayer.components.ihostRRt-Plugins.Extensions.IPTVPlayer.tools.iptvtoolsRRR	R
RRt-Plugins.Extensions.IPTVPlayer.tools.iptvtypesR
t2Plugins.Extensions.IPTVPlayer.libs.urlparserhelperRt"Plugins.Extensions.IPTVPlayer.libsRt*Plugins.Extensions.IPTVPlayer.libs.e2ijsonRt
json_loadsRRsRRRRRRR®(((sJ/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostredbull.pyt<module>s ".		ÿJ