コード例 #1
0
def Playvid(performerID, name):
	response = utils.getHtml("https://streamate.com/ajax/config/?name=" + name + "&sakey=&sk=streamate.com&userid=0&version=2.2.0&ajax=1")
	data = json.loads(response)
	
	host = data['liveservices']['host'] + "/socket.io/?puserid=" + performerID + "&EIO=3&transport=websocket" #24824942
	ws = websocket.WebSocket()
	ws = websocket.create_connection(host)
	
	ws.send('40/live')
	
	quitting = 0
	while quitting == 0:
		message =  ws.recv()
		match = re.compile('performer offline', re.DOTALL | re.IGNORECASE).findall(message)
		if match:
			quitting=1
			ws.close()
			utils.notify('Model is offline')
			return None

		match = re.compile('isPaid":true', re.DOTALL | re.IGNORECASE).findall(message)
		if match:
			quitting=1
			ws.close()
			utils.notify('Model not in freechat')
			return None
		   
        match = re.compile('roomInfoUpdate', re.DOTALL | re.IGNORECASE).findall(message)
        if match:
			ws.send('42/live,["GetVideoPath",{"nginx":1,"protocol":2,"attempt":1}]')
			while quitting == 0:
				message = ws.recv()
				match = re.compile('(http[^"]+m3u8)', re.DOTALL | re.IGNORECASE).findall(message)
				if match:
					videourl = match[0]
					quitting=1
					ws.close()

	iconimage = xbmc.getInfoImage("ListItem.Thumb")
	listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
	listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'})
	listitem.setProperty("IsPlayable","true")
	if int(sys.argv[1]) == -1:
		pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
		pl.clear()
		pl.add(videourl, listitem)
		xbmc.Player().play(pl)
	else:
		#iconimage = xbmc.getInfoImage("ListItem.Thumb")
		#listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
		#listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'})
		xbmc.Player().play(videourl, listitem)
コード例 #2
0
def get_roomid(url):
    global CAMGIRLPLOT
    global NAME
    CAMGIRLPLOT = ''
    ws = websocket.WebSocket()
    try:
        ws = websocket.create_connection(url)
    except:
        xbmc.log('[myUWC] ' + NAME + ' - RedTube Connection error',
                 xbmc.LOGERROR)
        if not check: utils.notify('Connection error!')
        return

    quitting = 0
    while quitting == 0:
        message = ws.recv()
        if message.startswith('42'):
            utils.kodilog(message)
            if 'Success' not in message:
                utils.notify(NAME, 'Offline?')
                return ''
            if 'NaiadFreeze' in message:
                data = re.compile('"data":.*?"(.+?)"',
                                  re.IGNORECASE | re.MULTILINE
                                  | re.DOTALL).findall(message)[0]
                utils.kodilog(str(message[0]))
                utils.notify(NAME, str(data))
                return ''
            if 'roomid' not in message:
                utils.notify(
                    NAME,
                    re.compile('"data".+?"(.+?)"', re.IGNORECASE | re.MULTILINE
                               | re.DOTALL).findall(message)[0])
                return ''
            roomid = re.compile('"roomid":"(.+?)"', re.IGNORECASE
                                | re.MULTILINE | re.DOTALL).findall(message)[0]
            plot = re.compile('"roomtopic":"(.+?)"', re.IGNORECASE
                              | re.MULTILINE | re.DOTALL).findall(message)
            if plot:
                CAMGIRLPLOT = plot[0].encode("ascii", errors="ignore")
            #xbmcgui.Dialog().textviewer(url, str(message) + '\nroomid= ' + roomid + '\nplot= ' + CAMGIRLPLOT)
            quitting = 1
    ws.close()
    return roomid
コード例 #3
0
def myfreecam_start(url):
    global CAMGIRL
    global CAMGIRLSERVER
    global CAMGIRLUID
    global CAMGIRLCHANID
  
    
    CAMGIRL= url
    CAMGIRLSERVER = 0

    try:
        host = "ws://"+str(random.choice(CHATSERVERS))+".myfreecams.com:8080/fcsl"
        utils.kodilog(host)
        ws = websocket.WebSocket()
        ws = websocket.create_connection(host)
        ws.send("hello fcserver\n\0")
        ws.send("1 0 0 20071025 0 guest:guest\n\0")
    except:
        xbmc.log('f****d')
        return ''
    rembuf=""
    quitting = 0
    while quitting == 0:
        sock_buf =  ws.recv()
        sock_buf=rembuf+sock_buf
        rembuf=""
        while True:
            hdr=re.search (r"(\w+) (\w+) (\w+) (\w+) (\w+)", sock_buf)
            if bool(hdr) == 0:
                break

            fc = hdr.group(1)
            mlen   = int(fc[0:4])
            fc_type = int(fc[4:])

            msg=sock_buf[4:4+mlen]

            if len(msg) < mlen:
                rembuf=''.join(sock_buf)
                break

            msg=urllib.unquote(msg)
#            utils.kodilog(msg)
            if fc_type == 1:
                ws.send("10 0 0 20 0 %s\n\0" % CAMGIRL)
            elif fc_type == 10:
                read_model_data(msg)
                quitting=1

            sock_buf=sock_buf[4+mlen:]

            if len(sock_buf) == 0:
                break
    ws.close()
    if CAMGIRLSERVER != 0:
#        Url="http://video"+str(CAMGIRLSERVER)+".myfreecams.com:1935/NxServer/ngrp:mfc_"+\
#            str(CAMGIRLCHANID)+".f4v_mobile/playlist.m3u8" #better resolution

        if PHASE == '':
            Url="https://"+str(CAMGIRLSERVER)+".myfreecams.com/NxServer/ngrp:mfc_"+\
                str(CAMGIRLCHANID)+".f4v_mobile/playlist.m3u8?nc=0.5863279394620062"
        else:
            Url="https://"+str(CAMGIRLSERVER)+".myfreecams.com/NxServer/ngrp:mfc_a_"+\
                str(CAMGIRLCHANID)+".f4v_mobile/playlist.m3u8?nc=0.5863279394620062"


        return Url
    else:
        pass
コード例 #4
0
def Playvid(performerID, name):
    response = utils.getHtml(
        "https://streamate.com/ajax/config/?name=" + name +
        "&sakey=&sk=streamate.com&userid=0&version=2.2.0&ajax=1")
    data = json.loads(response)

    host = data['liveservices'][
        'host'] + "/socket.io/?puserid=" + performerID + "&EIO=3&transport=websocket"
    ws = websocket.WebSocket()
    ws = websocket.create_connection(host)

    ws.send('40/live')

    quitting = 0
    while quitting == 0:
        message = ws.recv()
        match = re.compile('performer offline',
                           re.DOTALL | re.IGNORECASE).findall(message)
        if match:
            quitting = 1
            ws.close()
            utils.notify('Model is offline')
            return None

        match = re.compile('isPaid":true',
                           re.DOTALL | re.IGNORECASE).findall(message)
        if match:
            quitting = 1
            ws.close()
            utils.notify('Model not in freechat')
            return None

        match = re.compile('roomInfoUpdate',
                           re.DOTALL | re.IGNORECASE).findall(message)
        if match:
            ws.send(
                '42/live,["GetVideoPath",{"nginx":1,"protocol":2,"attempt":1}]'
            )
            while quitting == 0:
                message = ws.recv()
                match = re.compile('(http[^"]+m3u8)',
                                   re.DOTALL | re.IGNORECASE).findall(message)
                if match:
                    videourl = match[0]
                    quitting = 1
                    ws.close()

    iconimage = xbmc.getInfoImage("ListItem.Thumb")
    listitem = xbmcgui.ListItem(name,
                                iconImage="DefaultVideo.png",
                                thumbnailImage=iconimage)
    listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'})
    listitem.setProperty("IsPlayable", "true")
    if int(sys.argv[1]) == -1:
        pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        pl.clear()
        pl.add(videourl, listitem)
        xbmc.Player().play(pl)
    else:
        listitem.setPath(str(videourl))
        xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
コード例 #5
0
def Playvid(performerID, name, download=0):
    response = utils.getHtml(
        "https://streamate.com/ajax/config/?name=" + name +
        "&sakey=&sk=streamate.com&userid=0&version=2.2.0&ajax=1")
    data = json.loads(response)

    host = data['liveservices'][
        'host'] + "/socket.io/?puserid=" + performerID + "&EIO=3&transport=websocket"  #24824942
    ws = websocket.WebSocket()
    ws = websocket.create_connection(host)

    ws.send('40/live')

    quitting = 0
    i = 0
    while quitting == 0:
        i += 1
        message = ws.recv()
        match = re.compile('performer offline',
                           re.DOTALL | re.IGNORECASE).findall(message)
        if match:
            quitting = 1
            ws.close()
            utils.notify('Model is offline')
            return None

        match = re.compile('isPaid":true',
                           re.DOTALL | re.IGNORECASE).findall(message)
        if match:
            quitting = 1
            ws.close()
            utils.notify('Model not in freechat')
            return None

        if message == '40/live':
            ws.close()
            quitting = 1
            link = 'https://sea1b-ls.naiadsystems.com/sea1b-edge-ls/80/live/s:' + data[
                'performer']['nickname'] + '.json'
            ref = 'https://www.streamate.com/cam/' + data['performer'][
                'nickname']
            j = utils.getHtml(link, ref)
            match = re.compile('location":"([^"]+)"',
                               re.DOTALL | re.IGNORECASE).findall(j)
            videourl = match[0]

        # match = re.compile('roomInfoUpdate', re.DOTALL | re.IGNORECASE).findall(message)
        # if match:
        # ws.send('42/live,["GetVideoPath",{"nginx":1,"protocol":2,"attempt":1}]')
        # while quitting == 0:
        # message = ws.recv()
        # match = re.compile('(http[^"]+m3u8)', re.DOTALL | re.IGNORECASE).findall(message)
        # if match:
        # videourl = match[0]
        # quitting=1
        # ws.close()

    iconimage = xbmc.getInfoImage("ListItem.Thumb")
    listitem = xbmcgui.ListItem(name,
                                iconImage="DefaultVideo.png",
                                thumbnailImage=iconimage)
    listitem.setInfo('video', {'Title': name, 'Genre': 'Streamate'})
    listitem.setProperty("IsPlayable", "true")
    if int(sys.argv[1]) == -1:
        pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        pl.clear()
        pl.add(videourl, listitem)
        xbmc.Player().play(pl)
    else:
        #iconimage = xbmc.getInfoImage("ListItem.Thumb")
        #listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
        #listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'})
        xbmc.Player().play(videourl, listitem)
    if utils.addon.getSetting("dwnld_stream") == "true" or download == 1:
        utils.dwnld_stream(videourl, name)
コード例 #6
0
def myfreecam_start(url):
    global CAMGIRL
    global CAMGIRLSERVER
    global CAMGIRLUID
    global CAMGIRLCHANID
    CAMGIRL= url
    CAMGIRLSERVER = 0

    try:
        xchat=[ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 
            20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 
            33, 34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 46, 
            47, 48, 49, 56, 57, 58, 59, 60, 61
              ]
        host = "ws://xchat"+str(random.choice(xchat))+".myfreecams.com:8080/fcsl"
        ws = websocket.WebSocket()
        ws = websocket.create_connection(host)
        ws.send("hello fcserver\n\0")
        ws.send("1 0 0 20071025 0 guest:guest\n\0")
    except:
        xbmc.log('f****d')
        return ''
    rembuf=""
    quitting = 0
    while quitting == 0:
        sock_buf =  ws.recv()
        sock_buf=rembuf+sock_buf
        rembuf=""
        while True:
            hdr=re.search (r"(\w+) (\w+) (\w+) (\w+) (\w+)", sock_buf)
            if bool(hdr) == 0:
                break

            fc = hdr.group(1)

            mlen   = int(fc[0:4])
            fc_type = int(fc[4:])

            msg=sock_buf[4:4+mlen]

            if len(msg) < mlen:
                rembuf=''.join(sock_buf)
                break

            msg=urllib.unquote(msg)

            if fc_type == 1:
                ws.send("10 0 0 20 0 %s\n\0" % CAMGIRL)
            elif fc_type == 10:
                read_model_data(msg)
                quitting=1

            sock_buf=sock_buf[4+mlen:]

            if len(sock_buf) == 0:
                break
    ws.close()
    if CAMGIRLSERVER != 0:
        Url="http://video"+str(CAMGIRLSERVER)+".myfreecams.com:1935/NxServer/ngrp:mfc_"+\
            str(CAMGIRLCHANID)+".f4v_mobile/playlist.m3u8" #better resolution
        return Url
    else:
        pass
コード例 #7
0
def myfreecam_start(url):
    global CAMGIRL
    global CAMGIRLSERVER
    global CAMGIRLUID
    global CAMGIRLCHANID
    CAMGIRL= url
    CAMGIRLSERVER = 0

    try:
        xchat=[ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 
            20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 
            33, 34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 46, 
            47, 48, 49, 56, 57, 58, 59, 60, 61
              ]
        host = "ws://xchat"+str(random.choice(xchat))+".myfreecams.com:8080/fcsl"
        ws = websocket.WebSocket()
        ws = websocket.create_connection(host)
        ws.send("hello fcserver\n\0")
        ws.send("1 0 0 20071025 0 guest:guest\n\0")
    except:
        xbmc.log('f****d')
        return ''
    rembuf=""
    quitting = 0
    while quitting == 0:
        sock_buf =  ws.recv()
        sock_buf=rembuf+sock_buf
        rembuf=""
        while True:
            hdr=re.search (r"(\w+) (\w+) (\w+) (\w+) (\w+)", sock_buf)
            if bool(hdr) == 0:
                break

            fc = hdr.group(1)

            mlen   = int(fc[0:4])
            fc_type = int(fc[4:])

            msg=sock_buf[4:4+mlen]

            if len(msg) < mlen:
                rembuf=''.join(sock_buf)
                break

            msg=urllib.unquote(msg)

            if fc_type == 1:
                ws.send("10 0 0 20 0 %s\n\0" % CAMGIRL)
            elif fc_type == 10:
                read_model_data(msg)
                quitting=1

            sock_buf=sock_buf[4+mlen:]

            if len(sock_buf) == 0:
                break
    ws.close()
    if CAMGIRLSERVER != 0:
        Url="http://video"+str(CAMGIRLSERVER)+".myfreecams.com:1935/NxServer/ngrp:mfc_"+\
            str(CAMGIRLCHANID)+".f4v_mobile/playlist.m3u8" #better resolution
        return Url
    else:
        pass
コード例 #8
0
def myfreecam_start(url):
    global CAMGIRL
    global CAMGIRLSERVER
    global CAMGIRLUID
    global CAMGIRLCHANID
    global MFC_SERVERS

    CAMGIRL= url
    CAMGIRLSERVER = 0

    try:
        host = "ws://"+str(random.choice(MFC_SERVERS['CHATSERVERS']))+".myfreecams.com:8080/fcsl"
#        utils.kodilog(host)
        ws = websocket.WebSocket()
        ws = websocket.create_connection(host)

        ws.send("fcsws_20180422\n\0")
        ws.send("1 0 0 20071025 0 guest:guest\n\0")
    except Exception as e:
        xbmc.log('myUWC - MyFreeCams WS connect error- [' + e.message + '] ', xbmc.LOGNOTICE)

        return ''
    rembuf=""
    quitting = 0
    while quitting == 0:
        try:
            sock_buf =  ws.recv()
        except:
            utils.kodilog('myUWC - ' + url + ' - MyFreeCams Error receiving from websocket')
            return
        sock_buf=rembuf+sock_buf
        rembuf=""
        while True:
            hdr=re.search (r"(\w+) (\w+) (\w+) (\w+) (\w+)", sock_buf)
            if bool(hdr) == 0:
                break

            fc = hdr.group(1)
            mlen   = int(fc[0:6])
            fc_type = int(fc[6:])

            msg=sock_buf[6:6+mlen]

            if len(msg) < mlen:
                rembuf=''.join(sock_buf)
                break

            msg=urllib.unquote(msg)
            if fc_type == 1:
                ws.send("10 0 0 20 0 %s\n\0" % CAMGIRL)
            elif fc_type == 10:
                read_model_data(msg)
                quitting=1

            sock_buf=sock_buf[6+mlen:]

            if len(sock_buf) == 0:
                break
    ws.close()
    if CAMGIRLSERVER != 0:
        if PHASE == '':
            Url="https://" + str(CAMGIRLSERVER) + ".myfreecams.com/NxServer/ngrp:mfc_" + str(CAMGIRLCHANID) + ".f4v_mobile/playlist.m3u8?nc=0.5863279394620062"
        else:
            Url="https://" + str(CAMGIRLSERVER) + ".myfreecams.com/NxServer/ngrp:mfc_a_" + str(CAMGIRLCHANID) + ".f4v_mobile/playlist.m3u8?nc=0.5863279394620062"

        return Url
    else:
        pass