Пример #1
0
def resolve(name, url, iconimage, description):
    xbmc.log('URLLLL: {}'.format(url))
    if 'm3u8' in url:
        link = url
        link += '|User-Agent={}'.format(urllib.quote_plus(client.agent()))
        liz = xbmcgui.ListItem(name, iconImage=ICON, thumbnailImage=iconimage)
    else:
        url = base_url + url if url.startswith('/') else url
        info = client.request(url, headers=headers)
        head = client.parseDOM(info, 'title')[0].encode('utf-8')
        # title = client.parseDOM(info, 'meta', ret='content', attrs={'name': 'description'})[0].encode('utf-8')
        # name = '{0} - {1}'.format(head, title)
        poster = client.parseDOM(info,
                                 'meta',
                                 ret='content',
                                 attrs={'property': 'og:image'})[0]
        link = re.findall(r'''\,url:['"](.+?)['"]\}''', info, re.DOTALL)[0]
        link += '|User-Agent={}&Referer={}'.format(
            urllib.quote_plus(client.agent()), urllib.quote_plus(url))
        liz = xbmcgui.ListItem(head, iconImage=ICON, thumbnailImage=poster)

    try:
        liz.setInfo(type="Video", infoLabels={"Title": description})
        liz.setProperty("IsPlayable", "true")
        liz.setPath(str(link))
        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, liz)
    except:
        control.infoDialog(
            "[COLOR red]Dead Link[/COLOR]!\n[COLOR white]Please Try Another[/COLOR]",
            NAME, '')
Пример #2
0
def get_greek_cams():
    link = 'http://www.livecameras.gr/'
    headers = {"User-Agent": client.agent()}
    r = client.request(link, headers=headers)
    r = r.encode('utf-8')
    cams = client.parseDOM(r, 'div', attrs={'class': 'fp-playlist'})[0]
    cams = zip(client.parseDOM(cams, 'a', ret='href'),
               client.parseDOM(cams, 'a', ret='data-title'),
               client.parseDOM(cams, 'img', ret='src'))
    for stream, name, poster in cams:
        name = re.sub('".+?false', '', name)
        name = client.replaceHTMLCodes(name).encode('utf-8')
        stream = 'http:' + stream if stream.startswith('//') else stream
        stream += '|Referer={}'.format(link)
        poster = link + poster if poster.startswith('/') else poster
        addDir('[B][COLOR white]%s[/COLOR][/B]' % name, stream, 100, poster,
               '', 'name')
Пример #3
0
ADDON_DATA = ADDON.getAddonInfo('profile')
ADDON_PATH = ADDON.getAddonInfo('path')
DESCRIPTION = ADDON.getAddonInfo('description')
FANART = ADDON.getAddonInfo('fanart')
ICON = ADDON.getAddonInfo('icon')
ID = ADDON.getAddonInfo('id')
NAME = ADDON.getAddonInfo('name')
VERSION = ADDON.getAddonInfo('version')
Lang = ADDON.getLocalizedString
Dialog = xbmcgui.Dialog()
vers = VERSION
ART = ADDON_PATH + "/resources/icons/"

BASEURL = 'http://www.sporthd.live/'
Live_url = 'http://www.sporthd.live/index.php?'
headers = {'User-Agent': client.agent(), 'Referer': BASEURL}

from dateutil.parser import parse
from dateutil.tz import gettz
from dateutil.tz import tzlocal

# reload(sys)
# sys.setdefaultencoding("utf-8")

#######################################
# Time and Date Helpers
#######################################
try:
    local_tzinfo = tzlocal()
    locale_timezone = json.loads(
        xbmc.executeJSONRPC(
Пример #4
0
def get_video_url(page_url, referer):
    headers = {'User-Agent': client.agent(),
               'Referer': referer}
    if "hash=" in page_url:
        data = urllib.unquote(client.request(page_url))
        id_video = find_single_match(data, "vid':'([^']+)'")
        page_url = "http://hqq.watch/player/embed_player.php?vid=%s" % id_video
    else:
        page_url = page_url.replace("/watch_video.php?v=", "/player/embed_player.php?vid=")
    page_url = page_url.replace('https://netu.tv/', 'http://hqq.watch/')
    page_url = page_url.replace('https://waaw.tv/', 'http://hqq.watch/')

    data = client.request(page_url, headers=headers)

    js_wise = find_single_match(data, "<script type=[\"']text/javascript[\"']>\s*;?(eval.*?)</script>")
    data = jswise(js_wise).replace("\\", "")
    # ~ logger.debug(data)

    alea = str(random.random())[2:]
    data_ip = client.request('http://hqq.watch/player/ip.php?type=json&rand=%s' % alea)
    # ~ logger.debug(data_ip)
    json_data_ip = jsontools.load(data_ip)

    url = find_single_match(data, 'self\.location\.replace\("([^)]+)\)')
    url = url.replace('"+rand+"', alea)
    url = url.replace('"+data.ip+"', json_data_ip['ip'])
    url = url.replace('"+need_captcha+"', '0')  # json_data_ip['need_captcha'])
    url = url.replace('"+token', '')
    # ~ logger.debug(url)

    headers = {
        "User-Agent": 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/162671'}
    data = client.request('http://hqq.watch' + url, headers=headers)
    # ~ logger.debug(data)

    codigo_js = find_multiple_matches(data, '<script>document.write\(unescape\("([^"]+)')
    # ~ logger.debug(codigo_js)

    js_aux = urllib.unquote(codigo_js[0])
    at = find_single_match(js_aux, 'var at = "([^"]+)')

    js_aux = urllib.unquote(codigo_js[1])
    var_link_1 = find_single_match(js_aux, '&link_1=\\"\+encodeURIComponent\(([^)]+)')
    var_server_2 = find_single_match(js_aux, '&server_2=\\"\+encodeURIComponent\(([^)]+)')
    vid = find_single_match(js_aux, '&vid=\\"\+encodeURIComponent\(\\"([^"]+)')
    ext = '.mp4.m3u8'
    # ~ logger.debug('%s %s %s %s' % (at, var_link_1, var_server_2, vid))

    js_wise = find_single_match(data, "<script type=[\"']text/javascript[\"']>\s*;?(eval.*?)</script>")
    data = jswise(js_wise).replace("\\", "")
    # ~ logger.debug(data)

    variables = find_multiple_matches(data, 'var ([a-zA-Z0-9]+) = "([^"]+)";')
    # ~ logger.debug(variables)

    for nombre, valor in variables:
        # ~ logger.debug('%s %s' % (nombre, valor))
        if nombre == var_link_1:
            link_1 = valor
        if nombre == var_server_2:
            server_2 = valor

    link_m3u8 = 'http://hqq.watch/player/get_md5.php?ver=2&at=%s&adb=0&b=1&link_1=%s&server_2=%s&vid=%s&ext=%s' % (
        at, link_1, server_2, vid, ext)
    # ~ logger.debug(link_m3u8)


    return link_m3u8
Пример #5
0
ADDON       = xbmcaddon.Addon()
ADDON_DATA  = ADDON.getAddonInfo('profile')
ADDON_PATH  = ADDON.getAddonInfo('path')
DESCRIPTION = ADDON.getAddonInfo('description')
FANART      = ADDON.getAddonInfo('fanart')
ICON        = ADDON.getAddonInfo('icon')
ID          = ADDON.getAddonInfo('id')
NAME        = ADDON.getAddonInfo('name')
VERSION     = ADDON.getAddonInfo('version')
Lang        = ADDON.getLocalizedString
Dialog      = xbmcgui.Dialog()
vers = VERSION
ART = ADDON_PATH + "/resources/icons/"

BASEURL = 'http://mastelenovelashd.com/'
headers = {'User-Agent': client.agent(),
           'Referer': BASEURL}

def Main_menu():
    addDir('[B][COLOR white]Últimos capítulos agregados[/COLOR][/B]', BASEURL, 5, ICON, FANART, '')
    addDir('[B][COLOR white]Telenovelas en Emisión[/COLOR][/B]', BASEURL+'page/telenovelas-en-emision/', 5, ICON, FANART, '')
    addDir('[B][COLOR white]Lista de Telenovelas[/COLOR][/B]', BASEURL, 3, ICON, FANART, '')
    addDir('[B][COLOR white]Navegar por letras[/COLOR][/B]', BASEURL, 9, ICON, FANART, '')
    addDir('[B][COLOR gold]Versión: [COLOR lime]%s[/COLOR][/B]' % vers, '', 'BUG', ICON, FANART, '')
    xbmcplugin.setContent(int(sys.argv[1]), 'movies')


def Get_lista(url): #3
    r = client.request(url, headers=headers)
    r = client.parseDOM(r, 'ul', attrs={'id': 'telenovelas'})[0]
    r = client.parseDOM(r, 'li')