示例#1
0
 def __init__(self, lang='en'):
     self.COOKIE_FILE = GetCookieDir('google.cookie')
     self.HTTP_HEADER = {
         'Accept':
         'text/html',
         'Accept-Charset':
         'UTF-8',
         'Accept-Encoding':
         'gzip',
         'Accept-Language':
         lang,
         'Referer':
         'https://www.google.com/recaptcha/api2/demo',
         'User-Agent':
         'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'
     }
     self.HttpParams = {
         'header': self.HTTP_HEADER,
         'cookiefile': self.COOKIE_FILE,
         'use_cookie': True,
         'load_cookie': True,
         'save_cookie': True
     }
     self.cm = common()
     self.sessionEx = MainSessionWrapper()
示例#2
0
    def __init__(self, params={}):
        self.USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'
        self.HEADER = {
            'User-Agent': self.USER_AGENT,
            'Connection': 'keep-alive'
        }
        if '' != params.get('cookie', ''):
            self.COOKIE_FILE = GetCookieDir(params['cookie'])
            self.defaultParams = {
                'header': self.HEADER,
                'use_cookie': True,
                'load_cookie': True,
                'save_cookie': True,
                'cookiefile': self.COOKIE_FILE
            }
        else:
            self.defaultParams = {'header': self.HEADER}
        self.sessionEx = MainSessionWrapper()
        self.up = urlparser()
        self.ts_urlpars = ts_urlparser()
        proxyURL = params.get('proxyURL', '')
        useProxy = params.get('useProxy', False)
        self.cm = common(proxyURL, useProxy)

        self.currList = []
        self.currItem = {}
        if '' != params.get('history', ''):
            self.history = CSearchHistoryHelper(
                params['history'], params.get('history_store_type', False))
        self.moreMode = False
示例#3
0
 def __init__(self):
     CBaseHostClass.__init__(self)
     
     # temporary data
     self.currList = []
     self.currItem = {}
     
     #Login data
     self.sort = config.plugins.iptvplayer.SortowanieWebstream.value
     self.sessionEx = MainSessionWrapper()
     
     self.filmOnApi            = None
     self.videoStarApi         = None
     self.webCameraApi         = None
     self.wagasWorldApi        = None
     self.ustvnowApi           = None
     self.meteoPLApi           = None
     self.livemassNetApi       = None
     self.goldvodTvApi         = None
     self.sport365LiveApi      = None
     self.edemTvApi            = None
     self.wkylinewebcamsComApi = None
     self.wizjaTvApi           = None
     self.bilaSportPwApi       = None
     self.canlitvliveIoApi     = None
     self.weebTvApi            = None
     self.djingComApi          = None
     self.MLBStreamTVApi       = None
     self.BeinmatchApi         = None
     self.Wiz1NetApi           = None
     
     self.hasbahcaiptv = {}
     self.webcameraSubCats = {}
     self.webCameraParams = {}
示例#4
0
    def getVideoLink(self, url):
        printDBG("WeebTvApi.getVideoLink")
        rtmp = ''
        channel = url
        premium = 0
        if 0 == len(channel):
            return ''
        try:
            if config.plugins.iptvplayer.weebtv_premium.value:
                username = config.plugins.iptvplayer.weebtv_login.value
                password = config.plugins.iptvplayer.weebtv_password.value
                postdata = {'username': username, 'userpassword': password}
            else:
                postdata = {'username': '', 'userpassword': ''}
            postdata['channel'] = channel
            postdata['platform'] = WeebTvApi.HOST

            sts, data = self.cm.getPage(WeebTvApi.PLAYERURL,
                                        WeebTvApi.DEFPARAMS, postdata)
            if sts:
                printDBG("||||||||||||||||||||||||||||| " + data)
                parser = UrlParser()
                params = parser.getParams(data)
                status = parser.getParam(params, '0')
                premium = parser.getIntParam(params, '5')
                imgLink = parser.getParam(params, '8')
                rtmpLink = parser.getParam(params, '10')
                playPath = parser.getParam(params, '11')
                bitrate = parser.getIntParam(params, '20')
                token = parser.getParam(params, '73')
                title = parser.getParam(params, '6')

                if title == '':
                    title = parser.getParam(params, '7')

                video_quality = config.plugins.iptvplayer.weebtv_videoquality.value
                if video_quality == '2' and bitrate == 1:
                    playPath = playPath + 'HI'
                elif video_quality == '0' and bitrate == 2:
                    playPath = playPath + 'LOW'

                rtmp = str(rtmpLink) + '/' + str(
                    playPath
                ) + ' live=1 token=fake pageUrl=token swfUrl=' + str(token)
                printDBG("||||||||||||||||||||||||||||| " + rtmp)
        except Exception:
            printExc()

        if rtmp.startswith('rtmp'):
            if 0 == premium:
                MainSessionWrapper().waitForFinishOpen(
                    MessageBox,
                    _("You do not have a premium account. Starting a sponsored broadcast."
                      ),
                    type=MessageBox.TYPE_INFO,
                    timeout=5)
            return rtmp
        else:
            return ''
示例#5
0
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.sessionEx = MainSessionWrapper()
     self.MAIN_URL      = 'http://www.wagasworld.com/'
     self.HTTP_HEADER  = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0', 'Referer': self.MAIN_URL}
     self.COOKIE_FILE = GetCookieDir('wagasworld.cookie')
     self.http_params = {'header': dict(self.HTTP_HEADER), 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE}
     self.DEFAULT_URL_ICON = self.getFullIconUrl('/sites/default/files/styles/slideshow_full/public/12_0.jpg?itok=LHobtpyX')
示例#6
0
 def __init__(self):
     self.COOKIE_FILE = GetCookieDir('showsporttvcom.cookie')
     self.sessionEx = MainSessionWrapper()
     self.cm = common()
     self.up = urlparser()
     self.http_params = {}
     self.http_params.update({'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE})
     self.cacheList = {}
 def __init__(self):
     printDBG('Host __init__ begin')
     self.exSession = MainSessionWrapper()
     self.COOKIEFILE = GetCookieDir('scseriale.cookie')
     self.cm = common()
     self.currList = []
     self.up = urlparser()
     self.history = CSearchHistoryHelper('wspolne')
     printDBG('Host __init__ end')
示例#8
0
 def __init__(self):
     self.MAIN_URL   = 'https://edem.tv/'
     self.HTTP_HEADER  = { 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0', 'Referer': self.MAIN_URL }
     self.COOKIE_FILE = GetCookieDir('edemtv.cookie')
     self.cm = common()
     self.up = urlparser()
     self.http_params = {}
     self.http_params.update({'header' : self.HTTP_HEADER, 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE})
     self.cacheChannels = {}
     self.sessionEx = MainSessionWrapper()
示例#9
0
 def __init__(self):
     self.cm = common()
     self.up = urlparser()
     self.sessionEx = MainSessionWrapper()
     self.cookiePath = GetCookieDir('ustvnow.cookie')
     self.token = ''
     self.passkey = ''
     
     HTTP_HEADER= dict(self.HTTP_HEADER)
     HTTP_HEADER.update( {'Content-Type':'application/x-www-form-urlencoded'} )
     self.defParams = {'header':HTTP_HEADER, 'cookiefile': self.cookiePath, 'use_cookie': True, 'load_cookie':True, 'save_cookie':True}
示例#10
0
 def __init__(self, lang='en'):
     self.HTTP_HEADER = {
         'Accept-Language':
         lang,
         'Referer':
         'https://www.google.com/recaptcha/api2/demo',
         'User-Agent':
         'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110621 Mandriva Linux/1.9.2.18-0.1mdv2010.2 (2010.2) Firefox/3.6.18'
     }
     self.cm = common()
     self.sessionEx = MainSessionWrapper()
     self.COOKIE_FILE = GetCookieDir('google.cookie')
示例#11
0
 def __init__(self):
     self.COOKIE_FILE = GetCookieDir('sport365live.cookie')
     self.sessionEx = MainSessionWrapper()
     self.cm = common()
     self.up = urlparser()
     self.http_params = {
         'header': dict(self.HTTP_HEADER),
         'use_cookie': True,
         'save_cookie': True,
         'load_cookie': True,
         'cookiefile': self.COOKIE_FILE
     }
     self.needRefreshAdvert = True
示例#12
0
 def __init__(self):
     self.up = urlparser.urlparser()
     self.cm = pCommon.common()
     self.sessionEx = MainSessionWrapper()
     self.ytp = YouTubeParser()
     self.ytformats = config.plugins.iptvplayer.ytformat.value
     # Temporary data
     self.currList = []
     self.currItem = {}
     # Login data
     self.COOKIEFILE = GetCookieDir('Diff-anime.cookie')
     self.usePremiumAccount = config.plugins.iptvplayer.diffanime_premium.value
     self.username = config.plugins.iptvplayer.diffanime_login.value
     self.password = config.plugins.iptvplayer.diffanime_password.value
示例#13
0
    def __init__(self, params={}):
        self.sessionEx = MainSessionWrapper() 
        self.up = urlparser()
        
        proxyURL = params.get('proxyURL', '')
        useProxy = params.get('useProxy', False)
        self.cm = common(proxyURL, useProxy)

        self.currList = []
        self.currItem = {}
        if '' != params.get('history', ''):
            self.history = CSearchHistoryHelper(params['history'])
        if '' != params.get('cookie', ''):
            self.COOKIE_FILE = GetCookieDir(params['cookie'])
        self.moreMode = False
    def __init__(self, params={}):
        self.TMP_FILE_NAME = '.iptv_subtitles.file'
        self.TMP_DIR_NAME = '/.iptv_subtitles.dir/'
        self.sessionEx = MainSessionWrapper(mainThreadIdx=1)

        proxyURL = params.get('proxyURL', '')
        useProxy = params.get('useProxy', False)
        self.cm = common(proxyURL, useProxy)

        self.currList = []
        self.currItem = {}
        if '' != params.get('cookie', ''):
            self.COOKIE_FILE = GetCookieDir(params['cookie'])
        self.moreMode = False
        self.params = params
示例#15
0
 def __init__(self):
     self.MAIN_URL    = 'http://pierwsza.tv/'
     self.HTTP_HEADER = { 'User-Agent':'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36', 'Referer': self.MAIN_URL }
 
     self.COOKIE_FILE = GetCookieDir('pierwszatv.cookie')
     self.COOKIE_FILE2 = GetCookieDir('pierwszatv2.cookie')
     self.COOKIE_FILE3 = GetCookieDir('pierwszatv3.cookie')
     self.sessionEx = MainSessionWrapper()
     self.cm = common()
     self.up = urlparser()
     self.http_params = {'header': dict(self.HTTP_HEADER), 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE}
     self.http_params2 = {'header': dict(self.HTTP_HEADER), 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE2}
     self.http_params3 = {'header': dict(self.HTTP_HEADER), 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE3}
     self.cacheList = {}
     
     self.mainConnectData = {}
示例#16
0
    def __init__(self):
        CBaseHostClass.__init__(self)
        self.sessionEx = MainSessionWrapper()
        self.MAIN_URL = 'http://www.wagasworld.com/'
        self.HTTP_HEADER = {
            'User-Agent':
            'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0',
            'Referer': self.MAIN_URL
        }

        self.COOKIE_FILE = GetCookieDir('wagasworld.cookie')
        self.http_params = {
            'header': dict(self.HTTP_HEADER),
            'save_cookie': True,
            'load_cookie': True,
            'cookiefile': self.COOKIE_FILE
        }
示例#17
0
 def captcha(self):
     self.USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'
     self.HTTP_HEADER = {'User-Agent': self.USER_AGENT, 'DNT':'1', 'Accept': 'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding':'gzip, deflate', 'Referer':'https://zalukaj.com/', 'Origin':'https://zalukaj.com/'}
     self.defaultParams = {'header':self.HTTP_HEADER, 'with_metadata':True, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': self.COOKIE_FILE}
     httpParams = dict(self.defaultParams)
     imgUrl = 'https://zalukaj.com/captcha-image'
     from copy import deepcopy
     from Plugins.Extensions.IPTVPlayer.components.iptvmultipleinputbox import IPTVMultipleInputBox
     from Plugins.Extensions.IPTVPlayer.components.asynccall import MainSessionWrapper
     self.sessionEx = MainSessionWrapper()  
     captchaTitle = ''
     captchaLabel = _('Captcha')
     captchaTitle = captchaLabel  
     sendLabel = _('Send')
     header = dict(self.HTTP_HEADER)
     header['Accept'] = 'image/png,image/*;q=0.8,*/*;q=0.5'
     params = dict(self.defaultParams)
     params.update( {'maintype': 'image', 'subtypes':['jpeg', 'png'], 'check_first_bytes':['\xFF\xD8','\xFF\xD9','\x89\x50\x4E\x47'], 'header':header} )
     filePath = GetTmpDir('.iptvplayer_captcha.jpg')
     rm(filePath)
     ret = self.cm.saveWebFile(filePath, imgUrl.replace('&', '&'), params)
     if not ret.get('sts'):
         SetIPTVPlayerLastHostError(_('Fail to get "%s".') % imgUrl)
         return []
     params = deepcopy(IPTVMultipleInputBox.DEF_PARAMS)
     params['accep_label'] = sendLabel
     params['title'] = captchaLabel
     params['status_text'] = captchaTitle
     params['status_text_hight'] = 200
     params['with_accept_button'] = True
     params['list'] = []
     item = deepcopy(IPTVMultipleInputBox.DEF_INPUT_PARAMS)
     item['label_size'] = (660,110)
     item['input_size'] = (680,25)
     item['icon_path'] = filePath
     item['title'] = _('Answer')
     item['input']['text'] = ''
     params['list'].append(item)
     params['vk_params'] = {'invert_letters_case':True}
     ret = 0
     retArg = self.sessionEx.waitForFinishOpen(IPTVMultipleInputBox, params)
     printDBG(retArg)
     if retArg and len(retArg) and retArg[0]:
         return retArg[0][0].lower()
     else:
         return []
    def __init__(self):
        self.up = urlparser()
        self.cm = common()
        # temporary data
        self.currList = []
        self.currItem = {}

        #Login data
        self.sort = config.plugins.iptvplayer.SortowanieWebstream.value
        self.sessionEx = MainSessionWrapper()
        self.filmOnApi = None
        self.videoStarApi = None
        self.satLiveApi = None
        self.vidTvApi = None
        self.looknijTvApi = None
        self.tvSportCdaApi = None
        self.nettvpwApi = None
        self.weebTvApi = None
        self.teamCastTab = {}
示例#19
0
    def __init__(self, params={}):
        self.sessionEx = MainSessionWrapper()
        self.up = urlparser()

        proxyURL = params.get('proxyURL', '')
        useProxy = params.get('useProxy', False)
        if 'MozillaCookieJar' == params.get('cookie_type', ''):
            self.cm = common(proxyURL, useProxy, True)
        else:
            self.cm = common(proxyURL, useProxy)

        self.currList = []
        self.currItem = {}
        if '' != params.get('history', ''):
            self.history = CSearchHistoryHelper(
                params['history'], params.get('history_store_type', False))
        if '' != params.get('cookie', ''):
            self.COOKIE_FILE = GetCookieDir(params['cookie'])
        self.moreMode = False
        self.minPyVer = params.get('min_py_ver', 0)
示例#20
0
 def __init__(self, lang='en'):
     self.sessionEx = MainSessionWrapper()
示例#21
0
 def __init__(self):
     self.cm = common()
     self.sessionEx = MainSessionWrapper()
     self._reInit()
     self.channelsList = []
 def __init__(self, lang='en'):
     self.cm = common()
     self.sessionEx = MainSessionWrapper()
     self.MAIN_URL = 'https://2captcha.com/'
示例#23
0
 def __init__(self):
     self.cm = common()
     self.up = urlparser()
     self.sessionEx = MainSessionWrapper()
     self.defParams = {'header': self.HTTP_HEADER}
     self.warned = False
示例#24
0
 def __init__(self, lang='en'):
     self.cm = common()
     self.sessionEx = MainSessionWrapper()
     self.MAIN_URL = 'https://www.9kw.eu/'
示例#25
0
文件: videostar.py 项目: trunca/video
 def __init__(self):
     self.cm = common()  #proxyURL= '', useProxy = True)
     self.up = urlparser()
     self.sessionEx = MainSessionWrapper()
示例#26
0
 def __init__(self):
     self.COOKIE_FILE = GetCookieDir('satlivetv.cookie')
     self.cm = common()
     self.sessionEx = MainSessionWrapper()
     self.loggedIn  = True
     self.http_params = {}