Ejemplo n.º 1
0
	def resolve(self,url):
		from resources.lib.modules import liveresolver
		d = liveresolver.Liveresolver().resolve(url)
		if d:
			if d['url'].startswith('plugin://'):
				return d['url']

			return '{}|{}'.format(d['url'], urlencode(d['headers'])), False
		return ' '
Ejemplo n.º 2
0
	def resolve(self,url):
		url = 'https://www.streamlive.to/channel-player?n={}'.format(url)
		from resources.lib.modules import liveresolver
		d = liveresolver.Liveresolver().resolve(url)
		if not d or d is None:
			return ' '
		if d['url'].startswith('plugin://'):
			return d['url']

		if d:
			return '{}|{}'.format(d['url'], urlencode(d['headers'])), False
		return ' '
Ejemplo n.º 3
0
    def resolve(self, url):
        if 'hdmat' in url:
            from resources.lib.modules import liveresolver
            d = liveresolver.Liveresolver().resolve(url)
            if d:
                return '{}|{}'.format(d['url'],
                                      urlencode(d['headers'])).replace(
                                          '0.m3u8', '720p.m3u8')
        try:
            import resolveurl
            res = resolveurl.resolve(url)
        except:
            res = ' '
        if not res:
            from resources.lib.modules import liveresolver
            d = liveresolver.Liveresolver().resolve(url)
            if d:
                return '{}|{}'.format(d['url'], urlencode(d['headers']))
            else:
                return ' '

        return res
Ejemplo n.º 4
0
    def resolve(self, url):
        if 'it.rojadirecta' in url:
            html = requests.get(url,
                                headers={
                                    'referer': self.base,
                                    'user-agent': constants.USER_AGENT
                                }).text
            url = re.findall('href\s*=\s*[\"\']([^\"\']+)', html)[0]
        from resources.lib.modules import liveresolver
        d = liveresolver.Liveresolver().resolve(url)
        if not d or d is None:
            return ''
        if d['url'].startswith('plugin://'):
            return d['url']

        if d:
            return '{}|{}'.format(d['url'], urlencode(d['headers'])), False
        return ' '
Ejemplo n.º 5
0
    def resolve(self, url):
        html = requests.get(url,
                            headers={
                                'user-agent': constants.USER_AGENT,
                                'referer': self.base
                            }).text
        fid = re.findall('vaughn.live.+?video/?([^\?]+)', html)
        if len(fid) == 0:
            return ' '
        else:
            url = 'https://vaughn.live/' + fid[0]

        from resources.lib.modules import liveresolver
        d = liveresolver.Liveresolver().resolve(url)
        if not d or d is None:
            return ' '
        if d['url'].startswith('plugin://'):
            return d['url']

        if d:
            return '{}|{}'.format(d['url'], urlencode(d['headers'])), False
        return ''
Ejemplo n.º 6
0
import threading
import ctypes
import threading
import time
import xbmcgui
from resources.lib.modules.log_utils import log
from resources.lib.modules import liveresolver, control
res = liveresolver.Liveresolver()

try:
    import queue
except ImportError:
    import Queue as queue


def getLinks(out):
    if control.setting('link_precheck') == 'true' or len(out) < int(
            control.setting('min_links')):
        return out

    done = 0
    pDialog = xbmcgui.DialogProgress()
    pDialog.create('Streams', 'Searching for streams...')

    NUM_OF_THREADS = int(control.setting("threads_num"))
    TIMEOUT = int(control.setting("search_timeout"))

    threads = []
    input_queue = queue.Queue()
    output_queue = []
                   is_folder=True)

    addon.end_of_directory()

#for debug purposes
elif mode[0] == 'keyboard_open':

    keyboard = xbmc.Keyboard('', 'Enter URL:', False)
    keyboard.doModal()
    if keyboard.isConfirmed():
        query = keyboard.getText()
        if '.m3u8' in query:
            xbmc.Player().play(query)
        else:
            from resources.lib.modules import liveresolver
            resolved = liveresolver.Liveresolver().resolve(query)
            if resolved:
                if 'plugin://' in resolved['url']:
                    xbmc.executebuiltin('RunPlugin({})'.format(
                        resolved['url']))

                else:
                    resolved = '{}|{}'.format(resolved['url'],
                                              urlencode(resolved['headers']))
                    xbmc.Player().play(resolved)

elif mode[0] == 'open_category':
    category = args['category'][0]
    sources = os.listdir(AddonPath +
                         '/resources/lib/sources/{}'.format(category))
    for source in sources: