Пример #1
0
 def setIcon(self, sIcon):
     try:
         self.__sIcon = unicode(sIcon, 'utf-8')
     except:
         self.__sIcon = sIcon
     self.__sIcon = self.__sIcon.encode('utf-8')
     self.__sIcon = QuoteSafe(self.__sIcon)
Пример #2
0
 def setIcon(self, sIcon):
     if not sIcon:
         self.__sIcon = ''
         return
     try:
         self.__sIcon = unicode(sIcon, 'utf-8')
     except:
         self.__sIcon = sIcon
     self.__sIcon = self.__sIcon.encode('utf-8')
     self.__sIcon = QuoteSafe(self.__sIcon)
Пример #3
0
    def GetMedialinkDL(self, sHtmlContent):

        oParser = cParser()

        sPattern = '<a href *=[\'"](?!http:\/\/uptostream.+)([^<>]+?)[\'"] *class=\'big-button-green-flat mt-4 mb-4\''
        aResult = oParser.parse(sHtmlContent, sPattern)

        if (aResult[0]):
            return QuoteSafe(aResult[1][0])

        return False
Пример #4
0
def showLinks():
    oGui = cGui()

    oInputParameterHandler = cInputParameterHandler()
    sUrl = oInputParameterHandler.getValue('siteUrl')
    sMovieTitle = oInputParameterHandler.getValue('sMovieTitle')
    sThumb = oInputParameterHandler.getValue('sThumb')

    # patch for unicode url
    sUrl = QuoteSafe(sUrl)

    oRequestHandler = cRequestHandler(sUrl)
    sHtmlContent = oRequestHandler.request()

    sPattern = 'data-src="([^"]+)" target="filmPlayer".+?span class="([^"]+)"></span>.+?class="([^"]+)"></span>'
    oParser = cParser()
    aResult = oParser.parse(sHtmlContent, sPattern)

    if (aResult[0] == True):
        oOutputParameterHandler = cOutputParameterHandler()
        for aEntry in aResult[1]:

            sUrl2 = aEntry[0]
            sHost = aEntry[1].capitalize()
            if 'apidgator' in sHost or 'dl_to' in sHost:
                continue

            sLang = aEntry[2].upper().replace('L', '')
            sTitle = '%s (%s) [COLOR coral]%s[/COLOR]' % (sMovieTitle, sLang, sHost)

            oOutputParameterHandler.addParameter('siteUrl', sUrl2)
            oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle)
            oOutputParameterHandler.addParameter('sThumb', sThumb)
            oOutputParameterHandler.addParameter('sHost', sHost)
            oOutputParameterHandler.addParameter('sLang', sLang)

            oGui.addLink(SITE_IDENTIFIER, 'showHosters', sTitle, sThumb, '', oOutputParameterHandler)

    sPattern = 'href="(https:\/\/cineactu.co\/.+?").*?span class="([^"]+).*?class="([^"]+)'
    oParser = cParser()
    aResult = oParser.parse(sHtmlContent, sPattern)

    if (aResult[0] == True):
        oOutputParameterHandler = cOutputParameterHandler()
        for aEntry in aResult[1]:

            sUrl2 = aEntry[0]
            sHost = aEntry[1]
            if 'fichier' in sHost:
                sHost = '1 Fichier'
            if 'uptobox' in sHost:
                sHost = 'Uptobox'
            sHost = sHost.capitalize()  # ou autres ?

            sLang = aEntry[2].upper().replace('L', '')
            sTitle = '%s (%s) [COLOR coral]%s[/COLOR]' % (sMovieTitle, sLang, sHost)

            oOutputParameterHandler.addParameter('siteUrl', sUrl2)
            oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle)
            oOutputParameterHandler.addParameter('sThumb', sThumb)
            oOutputParameterHandler.addParameter('siteReferer', sUrl)
            oOutputParameterHandler.addParameter('sHost', sHost)
            oOutputParameterHandler.addParameter('sLang', sLang)
            oGui.addLink(SITE_IDENTIFIER, 'showHostersDL', sTitle, sThumb, '', oOutputParameterHandler)

    oGui.setEndOfDirectory()