Beispiel #1
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 = {}
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.MAIN_URL    = 'http://tele-wizja.ru/'
     self.HTTP_HEADER = { 'User-Agent':'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0'}
     self.COOKIE_FILE = GetCookieDir('telewizjacom.cookie')
     self.http_params = {}
     self.useProxy    = False
    def __init__(self):
        CBaseHostClass.__init__(self, {
            'history': '9cartoon.me',
            'cookie': 'CartoonME.cookie'
        })
        self.USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'
        self.defaultParams = {
            'use_cookie': True,
            'load_cookie': True,
            'save_cookie': True,
            'cookiefile': self.COOKIE_FILE
        }
        self.COOKIE_FILE_2 = GetCookieDir('CartoonME_links.cookie')
        self.MAIN_URL = 'http://9cartoon.me/'
        self.SEARCH_URL = self.MAIN_URL + 'Search?s='

        self.DEFAULT_ICON_URL = "http://logos.textgiraffe.com/logos/logo-name/Cartoon-designstyle-cartoon-m.png"

        self.MAIN_CAT_TAB = [{
            'category': 'list_types',
            'title': _('Cartoon list'),
            'url': self.getFullUrl('CartoonList')
        }, {
            'category': 'categories',
            'title': _('Genres'),
            'url': self.getMainUrl()
        }, {
            'category': 'search',
            'title': _('Search'),
            'search_item': True
        }, {
            'category': 'search_history',
            'title': _('Search history')
        }]
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.MAIN_URL    = 'http://www.meteo.pl/'
     self.HEADER = {'User-Agent': 'Mozilla/5.0', 'Accept': 'text/html'}
     self.COOKIE_FILE = GetCookieDir('iklubnet.cookie')
     
     self.http_params = {}
     self.http_params.update({'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE})
Beispiel #5
0
 def __init__(self):
     self.COOKIE_FILE = GetCookieDir('livespottingtv.cookie')
     self.cm = common()
     self.up = urlparser()
     self.http_params = {}
     self.http_params.update({
         'save_cookie': True,
         'load_cookie': True,
         'cookiefile': self.COOKIE_FILE
     })
     self.cache = {}
Beispiel #6
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}
Beispiel #7
0
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.MAIN_URL    = 'https://www.webcamera.pl/'
     self.DEFAULT_ICON_URL = 'http://static.webcamera.pl/webcamera/img/loader-min.png'
     self.HEADER = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0', 'Referer':self.getMainUrl(), 'Accept': 'text/html'}
     self.AJAX_HEADER = dict(self.HEADER)
     self.AJAX_HEADER.update( {'X-Requested-With': 'XMLHttpRequest'} )
     
     self.COOKIE_FILE = GetCookieDir('webcamerapl')
     self.defaultParams = {'with_metadata':True, 'header':self.HEADER, 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE}
     self.cacheList = {}
Beispiel #8
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')
Beispiel #9
0
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.MAIN_URL         = 'http://karwan.tv/'
     self.DEFAULT_ICON_URL = self.getFullUrl('images/KARWAN_TV_LOGO/www.karwan.tv.png')
     self.HEADER = {'User-Agent': 'Mozilla/5.0', 'Accept': 'text/html'}
     self.AJAX_HEADER = dict(self.HEADER)
     self.AJAX_HEADER.update( {'X-Requested-With': 'XMLHttpRequest'} )
     
     self.COOKIE_FILE = GetCookieDir('karwantv.cookie')
     
     self.http_params = {}
     self.http_params.update({'header':self.HEADER, 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE})
Beispiel #10
0
 def __init__(self):
     self.up = urlparser()
     self.cm = common()
     self.HTTP_HEADER = {'User-Agent': self.USER_AGENT, 'Referer': ''}
     self.COOKIEFILE = GetCookieDir("hdgocc.cookie")
     self.defaultParams = {
         'header': self.HTTP_HEADER,
         'use_cookie': True,
         'save_cookie': True,
         'load_cookie': False,
         'cookiefile': self.COOKIEFILE
     }
 def __init__(self):
     self.COOKIE_FILE = GetCookieDir('skylinewebcamscom.cookie')
     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 = {}
     self.mainMenuCache = {}
     self.lang = config.plugins.iptvplayer.skylinewebcams_lang.value
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.MAIN_URL         = 'http://wizja.tv/'
     self.DEFAULT_ICON_URL = 'http://wizja.tv/logo.png'
     self.HTTP_HEADER = {'User-Agent': 'Mozilla/5.0', 'Accept': 'text/html'}
     self.AJAX_HEADER = dict(self.HTTP_HEADER)
     self.AJAX_HEADER.update( {'X-Requested-With': 'XMLHttpRequest'} )
     
     self.COOKIE_FILE = GetCookieDir('wizjatv.cookie')
     
     self.http_params = {}
     self.http_params.update({'header':self.HTTP_HEADER, 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE})
     self.loggedIn = False
 def __init__(self):
     self.COOKIE_FILE = GetCookieDir('goldvodtv.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 = {}
     self.loggedIn = False
    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
        }
 def __init__(self):
     self.MAIN_URL = 'http://showsport-tv.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('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 = {}
Beispiel #16
0
    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)
        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('cookie', ''):
            self.COOKIE_FILE = GetCookieDir(params['cookie'])
        self.moreMode = False
        self.params = params
        self.minPyVer = params.get('min_py_ver', 0)
Beispiel #17
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)
    def __init__(self):
        CBaseHostClass.__init__(self)
        self.MAIN_URL = 'http://www.bilasport.com/'
        self.DEFAULT_ICON_URL = 'https://turtleboysports.com/wp-content/uploads/2017/10/nhl-logo.jpg'
        self.HTTP_HEADER = {
            'User-Agent':
            'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
            'Accept': 'text/html',
            'Accept-Encoding': 'gzip, deflate'
        }
        self.AJAX_HEADER = dict(self.HTTP_HEADER)
        self.AJAX_HEADER.update({'X-Requested-With': 'XMLHttpRequest'})

        self.COOKIE_FILE = GetCookieDir('bilasport.pw.cookie')

        self.defaultParams = {
            'header': self.HTTP_HEADER,
            'save_cookie': True,
            'load_cookie': True,
            'cookiefile': self.COOKIE_FILE
        }
    def __init__(self):
        self.IE_NAME = 'bbc.co.uk'
        self._ID_REGEX = r'[pb][\da-z]{7}'
        self._VALID_URL = r'''(?x)
                        https?://
                            (?:www\.)?bbc\.co\.uk/
                            (?:
                                programmes/(?!articles/)|
                                iplayer(?:/[^/]+)?/(?:episode/|playlist/)|
                                music/clips[/#]|
                                radio/player/
                            )
                            (?P<id>%s)(?!/(?:episodes|broadcasts|clips))
                        ''' % self._ID_REGEX

        self._MEDIASELECTOR_URLS = [
            'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/iptv-all/vpid/%s',
            'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/pc/vpid/%s',
            'http://open.live.bbc.co.uk/mediaselector/4/mtis/stream/%s',
            'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/journalism-pc/vpid/%s',
        ]

        self._MEDIASELECTOR_URLS_2 = self._MEDIASELECTOR_URLS

        InfoExtractor.__init__(self)
        self.COOKIE_FILE = GetCookieDir('bbciplayer.cookie')
        self.HEADER = {
            'User-Agent': 'Mozilla/5.0',
            'Accept':
            'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
            'Accept-Encoding': 'gzip, deflate'
        }
        self.cm.HEADER = self.HEADER  # default header
        self.defaultParams = {
            'header': self.HEADER,
            'use_cookie': True,
            'load_cookie': True,
            'save_cookie': True,
            'cookiefile': self.COOKIE_FILE
        }
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.MAIN_URL          = 'https://pilot.wp.pl/'
     self.API_BASE_URL      = 'https://api-pilot.wp.pl/'
     self.STATIC_BASE_URL   = 'https://static-pilot.wp.pl/'
 
     self.DEFAULT_ICON_URL = 'http://satkurier.pl/uploads/53612.jpg'
     self.USER_AGENT  = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'
     self.HTTP_HEADER = {'User-Agent': self.USER_AGENT, 'Accept': 'text/html', 'Accept-Encoding':'gzip, deflate'}
     self.AJAX_HEADER = dict(self.HTTP_HEADER)
     self.AJAX_HEADER.update( {'X-Requested-With': 'XMLHttpRequest'} )
     
     self.COOKIE_FILE = GetCookieDir('pilot.wp.pl.cookie')
     
     self.defaultParams = {}
     self.defaultParams.update({'header':self.HTTP_HEADER, 'ignore_http_code_ranges':[(422, 422), (404, 404), (500, 500)], 'save_cookie': True, 'load_cookie': True, 'cookiefile': self.COOKIE_FILE})
     self.loggedIn = False
     self.accountInfo = ''
     
     self.urlType = ''
     
     self.cacheChannelList = []
    def __init__(self):
        CBaseHostClass.__init__(self)
        self.MAIN_URL = 'https://www.djing.com/'
        self.DEFAULT_ICON_URL = 'https://www.djing.com/newimages/content/c01.jpg'
        self.HTTP_HEADER = {
            'User-Agent':
            'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
            'Accept': 'text/html',
            'Accept-Encoding': 'gzip, deflate'
        }
        self.AJAX_HEADER = dict(self.HTTP_HEADER)
        self.AJAX_HEADER.update({'X-Requested-With': 'XMLHttpRequest'})

        self.COOKIE_FILE = GetCookieDir('viortv.cookie')

        self.defaultParams = {}
        self.defaultParams.update({
            'header': self.HTTP_HEADER,
            'cookiefile': self.COOKIE_FILE
        })  #'save_cookie': True, 'load_cookie': True,
        self.loggedIn = False
        self.accountInfo = ''
    def __init__(self):
        CBaseHostClass.__init__(self)
        self.MAIN_URL = 'http://yooanime.com/'
        self.HEADER = {
            'User-Agent':
            'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10',
            'Accept': 'text/html'
        }
        self.AJAX_HEADER = dict(self.HEADER)
        self.AJAX_HEADER.update({'X-Requested-With': 'XMLHttpRequest'})

        self.COOKIE_FILE = GetCookieDir('yooanimecom.cookie')

        self.http_params = {}
        self.http_params.update({
            'header': self.HEADER,
            'save_cookie': True,
            'load_cookie': True,
            'cookiefile': self.COOKIE_FILE
        })

        self.cacheList = {}
    def __init__(self):
        CBaseHostClass.__init__(self)
        self.MAIN_URL = 'http://www.livemass.net/'
        self.DEFAULT_ICON_URL = 'http://s3.amazonaws.com/livemass/warrington/images/warrington/iconclr.png'
        self.HTTP_HEADER = {
            'User-Agent':
            'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
            'Accept': 'text/html',
            'Accept-Encoding': 'gzip, deflate'
        }
        self.AJAX_HEADER = dict(self.HTTP_HEADER)
        self.AJAX_HEADER.update({'X-Requested-With': 'XMLHttpRequest'})

        self.COOKIE_FILE = GetCookieDir('livemass.net')

        self.defaultParams = {
            'header': self.HTTP_HEADER,
            'with_metadata': True,
            'save_cookie': True,
            'load_cookie': True,
            'cookiefile': self.COOKIE_FILE
        }
        self.linksCache = {}
    def __init__(self):
        CBaseHostClass.__init__(self)
        self.MAIN_URL_TV = 'http://www.canlitvlive.io/'
        self.MAIN_URL_RADIO = 'http://www.canliradyolive.com/'
        self.MAIN_URL = self.MAIN_URL_TV
        self.DEFAULT_ICON_URL = 'http://www.canlitvlive.io/images/footer_simge.png'
        self.HTTP_HEADER = {
            'User-Agent':
            'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
            'Accept': 'text/html',
            'Accept-Encoding': 'gzip, deflate'
        }
        self.AJAX_HEADER = dict(self.HTTP_HEADER)
        self.AJAX_HEADER.update({'X-Requested-With': 'XMLHttpRequest'})

        self.COOKIE_FILE = GetCookieDir('canlitvlive.io.cookie')

        self.defaultParams = {}
        self.defaultParams.update({
            'header': self.HTTP_HEADER,
            'save_cookie': True,
            'load_cookie': True,
            'cookiefile': self.COOKIE_FILE
        })
 def __init__(self):
     self.cm = common()
     self.COOKIE_FILE = GetCookieDir('teledunet.cookie')
Beispiel #26
0
    def _unshorten_iivpl(self, baseUri):
        baseUri = strwithmeta(baseUri)
        ref = baseUri.meta.get('Referer', baseUri)
        USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'
        HTTP_HEADER = {
            'User-Agent': USER_AGENT,
            'Accept': '*/*',
            'Accept-Encoding': 'gzip, deflate',
            'Referer': ref
        }
        HTTP_HEADER_AJAX = {
            'User-Agent': USER_AGENT,
            'Accept': '*/*',
            'Accept-Encoding': 'gzip, deflate',
            'Referer': baseUri,
            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
            'X-Requested-With': 'XMLHttpRequest'
        }

        COOKIE_FILE = GetCookieDir('iit.pl')
        tries = 0
        retUri, retSts = '', 'KO'
        while tries < 2 and retSts != 'OK':
            tries += 1
            rm(COOKIE_FILE)
            try:
                params = {
                    'header': HTTP_HEADER,
                    'use_cookie': True,
                    'load_cookie': True,
                    'save_cookie': True,
                    'cookiefile': COOKIE_FILE
                }

                sts, data = self.cm.getPage(baseUri, params)

                sts, headers = self.cm.getPage(
                    'http://iiv.pl/modules/system/assets/js/framework.js',
                    params)

                headers = self.cm.ph.getDataBeetwenMarkers(
                    headers, 'headers', '}')[1]
                headers = re.compile('''['"]([^'^"]+?)['"]''').findall(headers)
                salt = self.cm.ph.getSearchGroups(
                    data, '''data\-salt="([^"]+?)"''')[0]
                time = self.cm.ph.getSearchGroups(
                    data, '''data\-time="([^"]+?)"''')[0]
                action = self.cm.ph.getSearchGroups(
                    data, '''data\-action="([^"]+?)"''')[0]
                banner = self.cm.ph.getSearchGroups(
                    data, '''data\-banner="([^"]+?)"''')[0]
                component = self.cm.ph.getSearchGroups(
                    data, '''data\-component="([^"]+?)"''')[0]
                if tries > 1: GetIPTVSleep().Sleep(int(time))

                sts, partials = self.cm.getPage(
                    'http://iiv.pl/themes/cutso/assets/javascript/shortcut/shortcut.js',
                    params)
                partials = self.cm.ph.getDataBeetwenMarkers(
                    partials, 'update:', '}')[1]
                partials = self.cm.ph.getSearchGroups(
                    partials, '''['"]([^'^"]+?)['"]''')[0]
                if partials == '': partials = 'shortcut/link_show'
                for header in headers:
                    if 'HANDLER' in header:
                        HTTP_HEADER_AJAX[header] = action
                    elif 'PARTIALS' in header:
                        HTTP_HEADER_AJAX[header] = partials

                post_data = {'salt': salt, 'banner': banner, 'blocker': 0}
                params['header'] = HTTP_HEADER_AJAX
                sts, data = self.cm.getPage(baseUri, params, post_data)
                data = byteify(json.loads(data))
                printDBG(">>>%s<<<" % data)
                uri = self.cm.ph.getSearchGroups(
                    data[partials], '''href="(https?://[^"]+?)"''')[0]
                retUri, retSts = uri, 'OK'

            except Exception as e:
                retUri, retSts = baseUri, str(e)
                printExc()

        return retUri, retSts
Beispiel #27
0
    def getLinksForVideo(self, cItem):
        printDBG("Laola1TV.getLinksForVideo [%s]" % cItem)
        urlTab = []
        baseUrl = cItem['url']
        try:
            sts, response = self.cm.getPage(baseUrl, {'return_data': False})
            baseUrl = response.geturl()
            response.close()
        except Exception:
            printExc()
            return []

        sts, data = self.cm.getPage(baseUrl)
        if not sts: return []

        data = self.cm.ph.getDataBeetwenMarkers(data,
                                                '<div class="videoplayer"',
                                                '</script>')[1]
        printDBG(data)
        getParams = {}
        getParams['videoid'] = self.cm.ph.getSearchGroups(
            data, '\svideoid\s*:\s*"([0-9]*?)"')[0]
        getParams['partnerid'] = self.cm.ph.getSearchGroups(
            data, '\spartnerid\s*:\s*"([0-9]*?)"')[0]
        getParams['language'] = self.cm.ph.getSearchGroups(
            data, '\slanguage\s*:\s*"([a-z]*?)"')[0]
        getParams['portal'] = self.cm.ph.getSearchGroups(
            data, '\portalid\s*:\s*"([a-z]*?)"')[0]
        getParams['format'] = 'iphone'
        vidUrl = self.cm.ph.getSearchGroups(data,
                                            '\configUrl\s*:\s*"([^"]*?)"')[0]
        if vidUrl.startswith('//'):
            vidUrl = 'http:' + vidUrl
        vidUrl += '?' + urllib.urlencode(getParams)
        vidUrl = self._getFullUrl(vidUrl, baseUrl)

        sts, data = self.getPage(vidUrl)
        if not sts: return []

        try:
            data = byteify(json.loads(data))
            url = data['video']['streamAccess']
            req_abo = []
            for item in data['video']['abo']['required']:
                req_abo.append(str(item))
        except Exception:
            return []
            printExc()

        ######################################################
        streamaccessTab = []
        post_data = {}
        for idx in range(len(req_abo)):
            post_data[idx] = req_abo[idx]
        sts, data = self.getPage(url, {}, post_data)
        try:
            data = byteify(json.loads(data))
            for item in data['data']['stream-access']:
                streamaccessTab.append(item)
        except Exception:
            printExc()

        comment = ''
        for streamaccess in streamaccessTab:
            for myip in [
                    '', config.plugins.iptvplayer.laola1tv_myip1.value,
                    config.plugins.iptvplayer.laola1tv_myip2.value
            ]:
                if '' != myip: header = {'X-Forwarded-For': myip}
                else: header = {}
                sts, data = self.getPage(streamaccess, {'header': header})
                if not sts: return urlTab
                data = self.cm.ph.getDataBeetwenMarkers(
                    data, '<data>', '</data>', False)[1]
                printDBG(data)
                comment = self.cm.ph.getSearchGroups(data,
                                                     'comment="([^"]+?)"')[0]
                auth = self.cm.ph.getSearchGroups(data, 'auth="([^"]+?)"')[0]
                if auth in ['restricted', 'blocked']: continue
                url = self.cm.ph.getSearchGroups(data, 'url="([^"]+?)"')[0]
                url = url + '?hdnea=' + auth

                if myip != '':
                    url = strwithmeta(url, {'X-Forwarded-For': myip})

                COOKIE_FILE = GetCookieDir('m3u8_laola1.tv')
                rm(COOKIE_FILE)
                cookieParams = {
                    'use_cookie': True,
                    'load_cookie': True,
                    'save_cookie': True,
                    'cookiefile': COOKIE_FILE
                }
                tmp = getDirectM3U8Playlist(url,
                                            checkExt=False,
                                            cookieParams=cookieParams,
                                            checkContent=True)
                if len(tmp):
                    urlMeta = {
                        'iptv_proto': 'm3u8',
                        'Origin': self.up.getDomain(baseUrl, False),
                        'Cookie': self.cm.getCookieHeader(COOKIE_FILE),
                        'User-Agent': self.cm.HOST,
                        'Referer': baseUrl
                    }
                for idx in range(len(tmp)):
                    tmp[idx]['need_resolve'] = 0
                    tmp[idx]['url'] = strwithmeta(tmp[idx]['url'], urlMeta)
                    urlTab.append(tmp[idx])
                break
            if 0 < len(urlTab):
                break

        if 0 < len(urlTab):
            max_bitrate = int(
                config.plugins.iptvplayer.laola1tv_defquality.value)

            def __getLinkQuality(itemLink):
                try:
                    value = itemLink['bitrate']
                    return int(value)
                except Exception:
                    printExc()
                    return 0

            urlTab = CSelOneLink(urlTab, __getLinkQuality,
                                 max_bitrate).getSortedLinks()
            if config.plugins.iptvplayer.laola1tv_onelink.value:
                urlTab = [urlTab[0]]
        else:
            SetIPTVPlayerLastHostError(comment)

        return urlTab
 def __init__(self):
     self.cm = common()
     self.HTTP_HEADER = {'User-Agent':self.USER_AGENT, 'Referer':''}
     self.COOKIEFILE = GetCookieDir("moonwalkcc.cookie")
     self.defaultParams = {'header':self.HTTP_HEADER, 'with_metadata':True, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': self.COOKIEFILE}
     self.baseUrl = ''