def serieHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) sHtmlContent = sHtmlContent.replace( '<iframe width="420" height="315" src="https://www.youtube.com/', '') sPattern = '<iframe.+?src="(http.+?)".+?>' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): i = 1 for aEntry in aResult[1]: sUrl = str(aEntry) sTitle = '%s episode %s' % (sMovieTitle, str(i)) sDisplayTitle = sTitle i = i + 1 oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sUrl) oOutputParameterHandler.addParameter('sMovieTitle', sTitle) oOutputParameterHandler.addParameter('sThumb', sThumb) oGui.addTV(SITE_IDENTIFIER, 'ShowSpecialHosters', sDisplayTitle, '', sThumb, '', oOutputParameterHandler) oGui.setEndOfDirectory()
def showSaisons(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) sHtmlContent = sHtmlContent.replace('<iframe width="420" height="315" src="https://www.youtube.com/', '') sPattern = '<iframe.+?src="(http.+?)".+?>' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == False): oGui.addText(SITE_IDENTIFIER) if (aResult[0] == True): i = 1 for aEntry in aResult[1]: sUrl = aEntry sTitle = '%s episode %s' % (sMovieTitle, i) i = i + 1 oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sUrl) oOutputParameterHandler.addParameter('sMovieTitle', sTitle) oOutputParameterHandler.addParameter('sThumb', sThumb) oGui.addTV(SITE_IDENTIFIER, 'ShowSpecialHosters', sTitle, '', sThumb, '', oOutputParameterHandler) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oParser = cParser() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) #Vire les bandes annonces sHtmlContent = sHtmlContent.replace('src="//www.youtube.com/', '') sPattern = '<iframe.+?src="([^"]+)"' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == False): oGui.addText(SITE_IDENTIFIER) if (aResult[0] == True): for aEntry in aResult[1]: sHosterUrl = str(aEntry) if '//goo.gl' in sHosterUrl: try: url8 = sHosterUrl.replace('https', 'http') opener = Noredirection() opener.addheaders.append(('User-Agent', UA)) opener.addheaders.append(('Connection', 'keep-alive')) HttpReponse = opener.open(url8) sHosterUrl = HttpReponse.headers['Location'] sHosterUrl = sHosterUrl.replace('https', 'http') except: pass # if 'official-film-illimite' in sHosterUrl and not 'vcstream' in sHosterUrl and not 'hd-stream.xyz' in sHosterUrl and not 'oload' in sHosterUrl: # #La vostfr n'existe que pour ce hoster # if '.srt' in sHosterUrl or 'VOSTFR' in sHosterUrl: # sDisplayTitle = sMovieTitle + ' [VOSTFR]' # else: # sDisplayTitle = sMovieTitle # sDisplayTitle = sDisplayTitle + ' [COLOR coral]Google[/COLOR]' # oOutputParameterHandler = cOutputParameterHandler() # oOutputParameterHandler.addParameter('siteUrl', sHosterUrl) # oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle) # oOutputParameterHandler.addParameter('sThumb', sThumb) # oGui.addLink(SITE_IDENTIFIER, 'ShowSpecialHosters', sDisplayTitle, sThumb, '', oOutputParameterHandler) # else: oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sMovieTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumbnail = oInputParameterHandler.getValue('sThumbnail') #oRequestHandler = cRequestHandler(sUrl) #sHtmlContent = oRequestHandler.request() sHtmlContent = SucurieBypass().GetHtml(sUrl) sHtmlContent = sHtmlContent.replace( '<iframe width="420" height="315" src="https://www.youtube.com/', '') sPattern = '<iframe.+?src="(http.+?)"' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) #print aResult if (aResult[0] == True): for aEntry in aResult[1]: sHosterUrl = str(aEntry) oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): sDisplayTitle = cUtil().DecoTitle(sMovieTitle) oHoster.setDisplayName(sDisplayTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumbnail) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumbnail = oInputParameterHandler.getValue('sThumbnail') #oRequestHandler = cRequestHandler(sUrl) #sHtmlContent = oRequestHandler.request() sHtmlContent = SucurieBypass().GetHtml(sUrl) sHtmlContent = sHtmlContent.replace('<iframe width="420" height="315" src="https://www.youtube.com/', '') sPattern = '<iframe.+?src="(http.+?)"' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) #print aResult if (aResult[0] == True): for aEntry in aResult[1]: sHosterUrl = str(aEntry) oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): sDisplayTitle = cUtil().DecoTitle(sMovieTitle) oHoster.setDisplayName(sDisplayTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumbnail) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) #Vire les bandes annonces sHtmlContent = sHtmlContent.replace('src="//www.youtube.com/', '') sPattern = '<iframe.+?src="(.+?)"' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) #print aResult if (aResult[0] == True): for aEntry in aResult[1]: if 'belike.pw' in aEntry: #print 'belike redirection' oRequestHandler = cRequestHandler('http:'+str(aEntry)) sHtmlContent = oRequestHandler.request() sPattern = 'file: *"([^"]+)",label:"' aResult = oParser.parse(sHtmlContent, sPattern) #print aResult if (aResult[0] == True): sHosterUrl = aResult[1][0] else : oRequestHandler = cRequestHandler('http:'+str(aEntry)) sHtmlContent = oRequestHandler.request() sPattern = 'src="([^"]+)"' aResult = oParser.parse(sHtmlContent, sPattern) #print aResult if (aResult[0] == True): sHosterUrl = aResult[1][0] else: sHosterUrl = str(aEntry) #print sHosterUrl oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): sDisplayTitle = cUtil().DecoTitle(sMovieTitle) oHoster.setDisplayName(sDisplayTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oParser = cParser() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) try: sHtmlContent = sHtmlContent.decode() except: pass # Vire les bandes annonces sHtmlContent = sHtmlContent.replace('src="//www.youtube.com/', '') sPattern = '<iframe.+?src="([^"]+)"' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == False): oGui.addText(SITE_IDENTIFIER) if (aResult[0] == True): for aEntry in aResult[1]: sHosterUrl = str(aEntry) if '//goo.gl' in sHosterUrl: try: url8 = sHosterUrl.replace('https', 'http') opener = Noredirection() opener.addheaders.append(('User-Agent', UA)) opener.addheaders.append(('Connection', 'keep-alive')) HttpReponse = opener.open(url8) sHosterUrl = HttpReponse.headers['Location'] sHosterUrl = sHosterUrl.replace('https', 'http') except: pass oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sMovieTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) #Vire les bandes annonces sHtmlContent = sHtmlContent.replace('src="//www.youtube.com/', '') sPattern = '<iframe.+?src="(.+?)"' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): for aEntry in aResult[1]: if 'belike' in aEntry: if aEntry.startswith('/'): oRequestHandler = cRequestHandler('https:' + str(aEntry)) else: oRequestHandler = cRequestHandler(str(aEntry)) oRequestHandler.request() sHosterUrl = oRequestHandler.getRealUrl() # sPattern = '<iframe.+?src="(.+?)"' # aResult = oParser.parse(sHtmlContent, sPattern) # if (aResult[0] == True): # sHosterUrl = aResult[1][0] else: sHosterUrl = str(aEntry) oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sMovieTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb) oGui.setEndOfDirectory()
def showSaisons(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sDesc = oInputParameterHandler.getValue('sDesc') sHtmlContent = SucurieBypass().GetHtml(sUrl) try: sHtmlContent = sHtmlContent.decode() except: pass sHtmlContent = sHtmlContent.replace('<iframe width="420" height="315" src="https://www.youtube.com/', '') sPattern = '<iframe.+?src="(http.+?)".+?>' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == False): oGui.addText(SITE_IDENTIFIER) if (aResult[0] == True): i = 1 for aEntry in aResult[1]: sUrl = aEntry sTitle = '%s episode %s' % (sMovieTitle.replace(' - Saison', ' Saison'), i) i = i + 1 oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sUrl) oOutputParameterHandler.addParameter('sMovieTitle', sTitle) oOutputParameterHandler.addParameter('sThumb', sThumb) oGui.addEpisode(SITE_IDENTIFIER, 'ShowSpecialHosters', sTitle, '', sThumb, sDesc, oOutputParameterHandler) oGui.setEndOfDirectory()
def serieHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumbnail = oInputParameterHandler.getValue('sThumbnail') #oRequestHandler = cRequestHandler(sUrl) #sHtmlContent = oRequestHandler.request() sHtmlContent = SucurieBypass().GetHtml(sUrl) sHtmlContent = sHtmlContent.replace( '<iframe width="420" height="315" src="https://www.youtube.com/', '') sPattern = '<div class="su-tabs-pane su-clearfix"><iframe.+?src="(http.+?)"[^<>]+?><\/iframe><\/div>' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): i = 1 for aEntry in aResult[1]: sHosterUrl = str(aEntry) oHoster = cHosterGui().checkHoster(sHosterUrl) sTitle = sMovieTitle + 'episode ' + str(i) sDisplayTitle = cUtil().DecoTitle(sTitle) i = i + 1 if (oHoster != False): oHoster.setDisplayName(sDisplayTitle) oHoster.setFileName(sTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumbnail) oGui.setEndOfDirectory()
def serieHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumbnail = oInputParameterHandler.getValue('sThumbnail') #oRequestHandler = cRequestHandler(sUrl) #sHtmlContent = oRequestHandler.request() sHtmlContent = SucurieBypass().GetHtml(sUrl) sHtmlContent = sHtmlContent.replace('<iframe width="420" height="315" src="https://www.youtube.com/', '') sPattern = '<div class="su-tabs-pane su-clearfix"><iframe.+?src="(http.+?)"[^<>]+?><\/iframe><\/div>' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): i = 1 for aEntry in aResult[1]: sHosterUrl = str(aEntry) oHoster = cHosterGui().checkHoster(sHosterUrl) sTitle = sMovieTitle + 'episode ' + str(i) sDisplayTitle = cUtil().DecoTitle(sTitle) i = i + 1 if (oHoster != False): oHoster.setDisplayName(sDisplayTitle) oHoster.setFileName(sTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumbnail) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oParser = cParser() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) #Vire les bandes annonces sHtmlContent = sHtmlContent.replace('src="//www.youtube.com/', '') sPattern = '<iframe.+?src="(.+?)"' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == False): oGui.addText(SITE_IDENTIFIER) if (aResult[0] == True): for aEntry in aResult[1]: sHosterUrl = str(aEntry) if '//goo.gl' in sHosterUrl: try: class NoRedirection(urllib2.HTTPErrorProcessor): def http_response(self, request, response): return response https_response = http_response url8 = sHosterUrl.replace('https', 'http') opener = urllib2.build_opener(NoRedirection) opener.addheaders.append(('User-Agent', UA)) opener.addheaders.append(('Connection', 'keep-alive')) HttpReponse = opener.open(url8) sHosterUrl = HttpReponse.headers['Location'] sHosterUrl = sHosterUrl.replace('https', 'http') except: pass if 'official-film-illimite' in sHosterUrl: #La vostfr n'existe que pour ce hoster if '.srt' in sHosterUrl or 'VOSTFR' in sHosterUrl: sDisplayTitle = sMovieTitle + ' [VOSTFR]' else: sDisplayTitle = sMovieTitle sDisplayTitle = sDisplayTitle + ' [COLOR skyblue]Google[/COLOR]' oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sHosterUrl) oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle) oOutputParameterHandler.addParameter('sThumb', sThumb) oGui.addLink(SITE_IDENTIFIER, 'ShowSpecialHosters', sDisplayTitle, sThumb, '', oOutputParameterHandler) else: oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sMovieTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb) oGui.setEndOfDirectory()
def showMovies(sSearch=''): oGui = cGui() if sSearch: sUrl = sSearch.replace(' ', '+') else: oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sHtmlContent = SucurieBypass().GetHtml(sUrl) sHtmlContent = sHtmlContent.replace('en illimité', 'en illimite') oParser = cParser() sPattern = 'class="item">.+?href="([^"]+).+?src="([^"]+)" alt="([^"]+).+?ttx">([^<]+).+?(?:|class="year">([^<]+).+?)class="calidad2' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == False): oGui.addText(SITE_IDENTIFIER) if (aResult[0] == True): total = len(aResult[1]) progress_ = progress().VScreate(SITE_NAME) for aEntry in aResult[1]: progress_.VSupdate(progress_, total) if progress_.iscanceled(): break sTitle = aEntry[2].replace(' Streaming Ultra-HD', '').replace(' Streaming Full-HD', '')\ .replace(' en Streaming HD', '').replace(' Streaming HD', '')\ .replace(' streaming', '').replace('HD', '') try: sTitle = sTitle.decode('utf8') except: pass sTitle = cUtil().unescape(sTitle) try: sTitle = sTitle.encode("utf-8") except: pass sUrl2 = aEntry[0] sThumb = re.sub('/w\d+', '/w342', aEntry[1]) if sThumb.startswith('//'): sThumb = 'http:' + sThumb sDesc = aEntry[3].split('en illimite')[1].replace(' ', '') sYear = aEntry[4] # Si recherche et trop de resultat, on filtre if sSearch and total > 2: if cUtil().CheckOccurence(sSearch.replace(URL_SEARCH[0], ''), sTitle) == 0: continue oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sUrl2) oOutputParameterHandler.addParameter('sMovieTitle', sTitle) oOutputParameterHandler.addParameter('sThumb', sThumb) oOutputParameterHandler.addParameter('sDesc', sDesc) oOutputParameterHandler.addParameter('sYear', sYear) sPattern1 = '.+?saison [0-9]+' aResult1 = oParser.parse(sTitle, sPattern1) if aResult1[0]: oGui.addTV(SITE_IDENTIFIER, 'showSaisons', sTitle, '', sThumb, sDesc, oOutputParameterHandler) else: oGui.addMovie(SITE_IDENTIFIER, 'showHosters', sTitle, '', sThumb, sDesc, oOutputParameterHandler) progress_.VSclose(progress_) if not sSearch: sNextPage = __checkForNextPage(sHtmlContent) if (sNextPage != False): oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sNextPage) number = re.search('page/([0-9]+)', sNextPage).group(1) oGui.addNext(SITE_IDENTIFIER, 'showMovies', '[COLOR teal]Page ' + number + ' >>>[/COLOR]', oOutputParameterHandler) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oParser = cParser() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumb = oInputParameterHandler.getValue('sThumb') sHtmlContent = SucurieBypass().GetHtml(sUrl) #Vire les bandes annonces sHtmlContent = sHtmlContent.replace('src="//www.youtube.com/', '') sPattern = '<iframe.+?src="(.+?)"' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == False): oGui.addText(SITE_IDENTIFIER) if (aResult[0] == True): for aEntry in aResult[1]: sHosterUrl = str(aEntry) if '//goo.gl' in sHosterUrl: try: class NoRedirection(urllib2.HTTPErrorProcessor): def http_response(self, request, response): return response https_response = http_response url8 = sHosterUrl.replace('https', 'http') opener = urllib2.build_opener(NoRedirection) opener.addheaders.append (('User-Agent', UA)) opener.addheaders.append (('Connection', 'keep-alive')) HttpReponse = opener.open(url8) sHosterUrl = HttpReponse.headers['Location'] sHosterUrl = sHosterUrl.replace('https', 'http') except: pass # if 'official-film-illimite' in sHosterUrl and not 'vcstream' in sHosterUrl and not 'hd-stream.xyz' in sHosterUrl and not 'oload' in sHosterUrl: # #La vostfr n'existe que pour ce hoster # if '.srt' in sHosterUrl or 'VOSTFR' in sHosterUrl: # sDisplayTitle = sMovieTitle + ' [VOSTFR]' # else: # sDisplayTitle = sMovieTitle # sDisplayTitle = sDisplayTitle + ' [COLOR coral]Google[/COLOR]' # oOutputParameterHandler = cOutputParameterHandler() # oOutputParameterHandler.addParameter('siteUrl', sHosterUrl) # oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle) # oOutputParameterHandler.addParameter('sThumb', sThumb) # oGui.addLink(SITE_IDENTIFIER, 'ShowSpecialHosters', sDisplayTitle, sThumb, '', oOutputParameterHandler) # else: oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sMovieTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb) oGui.setEndOfDirectory()
def showHosters(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sThumbnail = oInputParameterHandler.getValue('sThumbnail') #oRequestHandler = cRequestHandler(sUrl) #sHtmlContent = oRequestHandler.request() sHtmlContent = SucurieBypass().GetHtml(sUrl) #Vire les bandes annonces sHtmlContent = sHtmlContent.replace('src="https://www.youtube.com/', '') #fh = open('c:\\test.txt', "w") #fh.write(sHtmlContent) #fh.close() sPattern = '<iframe[^<>]+?src="(http.+?)"' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) #xbmc.log(sUrl) #xbmc.log(str(aResult)) if (aResult[0] == True): for aEntry in aResult[1]: sHosterUrl = str(aEntry) if '//goo.gl' in sHosterUrl: try: class NoRedirection(urllib2.HTTPErrorProcessor): def http_response(self, request, response): return response url8 = sHosterUrl.replace('https', 'http') opener = urllib2.build_opener(NoRedirection) opener.addheaders.append(( 'User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0' )) opener.addheaders.append(('Connection', 'keep-alive')) HttpReponse = opener.open(url8) sHosterUrl = HttpReponse.headers['Location'] except: pass if 'official-film-illimite' in sHosterUrl: sDisplayTitle = cUtil().DecoTitle(sMovieTitle) sDisplayTitle = sDisplayTitle + ' [COLOR skyblue]Google[/COLOR]' oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sHosterUrl) oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle) oOutputParameterHandler.addParameter('sThumbnail', sThumbnail) oGui.addMisc(SITE_IDENTIFIER, 'ShowSpecialHosters', sDisplayTitle, 'films.png', sThumbnail, '', oOutputParameterHandler) else: oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): sDisplayTitle = cUtil().DecoTitle(sMovieTitle) oHoster.setDisplayName(sDisplayTitle) oHoster.setFileName(sMovieTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumbnail) oGui.setEndOfDirectory()