예제 #1
0
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "", "Loading video page", "")
    videopage = utils.getHtml(url)
    videolink = re.compile('<iframe src="([^"]+)" ', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    if videolink.startswith('https://cine-matik.com/'):
        page = utils.getHtml(videolink, url)
        alternative = re.compile('input type="hidden" id="alternative" value="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(page)[0]
        video = videolink.replace('https://cine-matik.com/player/play.php?vid=','')
        posturl = 'https://cine-matik.com/player/ajax_sources.php'
        postRequest = {'vid' : video, 'alternative' : alternative}
        response = utils.postHtml(posturl, form_data=postRequest, headers={'X-Requested-With' : 'XMLHttpRequest'}, compression=False)
        js = json.loads(response)
        sources = js["source"]
        alternative1 = js["alternative"] if len(sources) == 0 else alternative
        if len(sources) == 1 and not sources[0]["file"]: alternative1 = js["alternative"] 
        if alternative1 != alternative:
            postRequest = {'vid' : video, 'alternative' : 'mp4'}
            response = utils.postHtml(posturl, form_data=postRequest, headers={'X-Requested-With' : 'XMLHttpRequest'}, compression=False)
            js = json.loads(response)
            sources = js["source"]
        videolink = sources[0]["file"] if len(sources) !=0 else ''
        if not videolink:
            utils.notify('Oh oh','Couldn\'t find a video')
            return
        vp.play_from_direct_link(videolink)
    else:
        videolink = videolink.replace('https://www.pornhub.com/embed/','https://www.pornhub.com/view_video.php?viewkey=')
        videolink = videolink.replace('woof.tube','verystream.com')
        vp.play_from_link_to_resolve(videolink)
예제 #2
0
def getStreamCloud(url):
    progress.update(40, "", "Opening Streamcloud", "")
    scpage = utils.getVideoLink(url, "")
    progress.update(50, "", "Getting Streamcloud page", "")
    schtml = utils.postHtml(scpage)
    form_values = {}
    match = re.compile('<input.*?name="(.*?)".*?value="(.*?)">', re.DOTALL | re.IGNORECASE).findall(schtml)
    for name, value in match:
        form_values[name] = value.replace("download1", "download2")
    progress.update(60, "", "Grabbing video file", "")
    newscpage = utils.postHtml(scpage, form_data=form_values)
    videourl = re.compile('file:\s*"(.+?)",', re.DOTALL | re.IGNORECASE).findall(newscpage)
    progress.update(80, "", "Returning video file", "")
    return videourl[0]
예제 #3
0
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "[CR]Loading video page[CR]")
    video_page = utils.getHtml(url, site.url)
    videourl = ''
    ajaxurl = 'https://sextb.net/ajax/player'
    embeds = re.compile(
        r'class="btn-player.+?data-source="([^"]+).+?data-id="([^"]+).+?/i>\s*([^<]+)',
        re.DOTALL | re.IGNORECASE).findall(video_page)
    sources = {
        enames[hoster] if hoster in enames.keys() else hoster:
        vid + '$$' + embed
        for vid, embed, hoster in embeds if hoster != 'VIP'
    }
    source = utils.selector('Select Hoster', sources)
    if source:
        filmid, episode = source.split('$$')
        formdata = {'filmId': filmid, 'episode': episode}
        player = json.loads(utils.postHtml(ajaxurl,
                                           form_data=formdata)).get('player')
        videourl = re.findall(r'src="([^?"]+)', player)[0]

    if not videourl:
        vp.progress.close()
        return

    vp.play_from_link_to_resolve(videourl)
예제 #4
0
def Play(url, name, download=None):
    vp = utils.VideoPlayer(name, download=download, regex='"file":"([^"]+)"')
    videohtml = utils.getHtml(url)
    match = re.compile(r'<iframe[^>]+src="([^"]+)"',
                       re.DOTALL | re.IGNORECASE).findall(videohtml)

    playerurl = match[0]
    playerhtml = utils.getHtml(playerurl, url)
    match = re.compile(
        r'''var hash = '([^']+)'.+?var baseURL = '([^']+)'.+?getPhiPlayer\(hash,'([^']+)',"(\d+)"\);''',
        re.DOTALL | re.IGNORECASE).findall(playerhtml)
    if match:
        hash, baseurl, alternative, order = match[0]

        formdata = {'vid': hash, 'alternative': alternative, 'ord': order}
        data = utils.postHtml(baseurl + 'ajax_sources.php', form_data=formdata)
        data = data.replace(r'\/', '/')
        jsondata = json.loads(data)
        videolink = jsondata["source"][0]["file"]
    else:
        videolink = playerurl
    if 'spankbang' in videolink:
        videolink = videolink.replace('/embed/', '/video/')
        Playvid(videolink, name, download=download)
    elif 'xhamster' in videolink:
        vp.play_from_link_to_resolve(videolink)
    else:
        vp.play_from_direct_link(videolink)
예제 #5
0
def Playvid(username, name):
    try:
       postRequest = {'method' : 'getRoomData', 'args[]' : 'false', 'args[]' : str(username)}
       response = utils.postHtml('http://bongacams.com/tools/amf.php', form_data=postRequest,headers={'X-Requested-With' : 'XMLHttpRequest'},compression=False)
    except:
        utils.notify('Oh oh','Couldn\'t find a playable webcam link')
        return None

    amf_json = json.loads(response)

    if amf_json['localData']['videoServerUrl'].startswith("//mobile"):
       videourl = 'https:' + amf_json['localData']['videoServerUrl'] + '/hls/stream_' + username + '.m3u8'  
    else:
       videourl = 'https:' + amf_json['localData']['videoServerUrl'] + '/hls/stream_' + username + '/playlist.m3u8'

    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)
예제 #6
0
def hanime_list(url='', search='', page=0):
    tag = []
    if url:
        if '|' in url:
            tag = url.split('|')
        else:
            tag.append(url)
    mode = 'OR' if len(tag) == 1 else 'AND'

    siteurl = 'https://search.htv-services.com/'
    data = {
        "search_text": search,
        "tags": tag,
        "tags_mode": mode,
        "brands": [],
        "blacklist": [],
        "order_by": "created_at_unix",
        "ordering": "desc",
        "page": page
    }
    _user_agent = 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 ' + \
                  '(KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1'
    try:
        listhtml = utils.postHtml(siteurl,
                                  json_data=data,
                                  headers={'User-Agent': _user_agent})
    except Exception as e:
        utils.notify('Notify', e)
        return None
    hits = json.loads(listhtml)
    videos = json.loads(hits['hits'])
    for video in videos:
        name = video['name']
        if video['is_censored'] is False:
            name = name + " [COLOR hotpink][I]Uncensored[/I][/COLOR]"
        videoid = video['slug']
        img = video['cover_url'].replace('highwinds-cdn.com', 'droidbuzz.top')
        fanart = video['poster_url'].replace('highwinds-cdn.com',
                                             'droidbuzz.top')
        plot = video['description'].replace('<p>', '').replace('</p>', '')
        contexturl = (utils.addon_sys + "?mode=" + str('hanime.hanime_eps') +
                      "&url=" + urllib_parse.quote_plus(videoid))
        contextmenu = ('[COLOR deeppink]Check other episodes[/COLOR]',
                       'RunPlugin(' + contexturl + ')')
        site.add_download_link(name,
                               videoid,
                               'hanime_play',
                               img,
                               plot,
                               noDownload=True,
                               contextm=contextmenu,
                               fanart=fanart)

    if 'nbPages' in hits:
        totalp = hits['nbPages']
        npage = page + 1
        if npage < totalp:
            site.add_dir('Next Page', url, 'hanime_list', site.img_next, npage)

    utils.eod()
예제 #7
0
def getStreamCloud(url):
    progress.update(40, "", "Opening Streamcloud", "")
    scpage = utils.getVideoLink(url, '')
    progress.update(50, "", "Getting Streamcloud page", "")
    schtml = utils.postHtml(scpage)
    form_values = {}
    match = re.compile('<input.*?name="(.*?)".*?value="(.*?)">',
                       re.DOTALL | re.IGNORECASE).findall(schtml)
    for name, value in match:
        form_values[name] = value.replace("download1", "download2")
    progress.update(60, "", "Grabbing video file", "")
    newscpage = utils.postHtml(scpage, form_data=form_values)
    videourl = re.compile('file:\s*"(.+?)",',
                          re.DOTALL | re.IGNORECASE).findall(newscpage)
    progress.update(80, "", "Returning video file", "")
    return videourl[0]
예제 #8
0
def List(url, page=0):
    try:
        postRequest = {'page': str(page)}
        response = utils.postHtml(url,
                                  form_data=postRequest,
                                  headers={},
                                  compression=False)
    except:
        return None
    videos = response.split('class="video-item')
    videos.pop(0)
    for video in videos:
        match = re.compile(
            r'video([^"]+)".+?thumb="([^"]+)".+?video-time">([^<]+)<.+?video-title.+?">([^<]*)<',
            re.DOTALL | re.IGNORECASE).findall(video)
        if match:
            videourl, img, length, name = match[0]
            videourl = site.url + 'watch/' + videourl
            name = utils.cleantext(name)
            shortname = re.sub(r'\[[^\]]+\]', '', name)
            shortname = re.sub(r'\([^\)]+\)', '', shortname)
            shortname = re.sub(r'\[[^\]]+$', '', shortname)
            shortname = re.sub(r' - \w+ \d+, \d+.*$', '', shortname)
            shortname = shortname if shortname else name
            site.add_download_link(shortname,
                                   videourl,
                                   'Playvid',
                                   img,
                                   name,
                                   duration=length)
    npage = page + 1
    site.add_dir('Next Page (' + str(npage + 1) + ')', url, 'List',
                 site.img_next, npage)
    utils.eod()
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "", "Loading video page", "")
    videohtml = utils.getHtml(url, '')
    stream_key = re.compile('data-streamkey="([^"]+)"',
                            re.DOTALL | re.IGNORECASE).findall(videohtml)[0]
    url = 'https://spankbang.com/api/videos/stream'
    form_data = {'id': stream_key, 'data': 0}
    #, 'sb_csrf_session': sb_csrf_session }
    headers = {
        'Referer': 'https://spankbang.com/',
        #   'X-CSRFToken': sb_csrf_session,
    }
    resp = utils.postHtml(url,
                          form_data=form_data,
                          headers=headers,
                          compression=False,
                          NoCookie=None)
    #    sources = {}
    #    srcs = re.compile('"stream_url_(240p|320p|480p|720p|1080p|4k)":\["([^"]+)"', re.DOTALL | re.IGNORECASE).findall(resp)
    #    if not srcs:
    #        srcs = re.compile('"stream_url_m(3u)8":\["([^"]+)"', re.DOTALL | re.IGNORECASE).findall(resp)
    #    for quality, videourl in srcs:
    #        if videourl:
    #            sources[quality] = videourl
    #    videourl = utils.selector('Select quality', sources, dont_ask_valid=True, sort_by=lambda x: 1081 if x == '4k' else int(x[:-1]), reverse=True)
    sources = json.loads(resp)
    videourl = sources['m3u8'][0]
    if not videourl:
        return
    vp.play_from_direct_link(videourl)
예제 #10
0
def login(url):
    if 'javwhores' in url:
        username = utils.addon.getSetting('jw_user')
        password = utils.addon.getSetting('jw_pass')
        loginurl = 'https://www.javwhores.com/ajax-login/'
    if 'porntrex' in url:
        username = utils.addon.getSetting('pt_user')
        password = utils.addon.getSetting('pt_pass')
        loginurl = 'https://www.porntrex.com/ajax-login/'
    if username and password:
        values = {
            'username': username,
            'pass': password,
            'remember_me': '1',
            'action': 'login',
            'email_link': 'https://www.javwhores.com/email/'
        }
        data = utils.postHtml(loginurl,
                              form_data=values,
                              compression=False,
                              NoCookie=None)
        if '>Log out<' not in data:
            utils.notify(
                'Info', 'Login failed - check username/password in settings.')
            return
        return data
    else:
        return
예제 #11
0
def yourporn_list(url, page=None, section=None):

	popular_mode = section if section else None
	try:
		if popular_mode and page:
			listhtml = utils.postHtml(url, compression=False, form_data={'period': 'week', 'popular_source': 'blogs', 'popular_mode': popular_mode, 'popular_off': page})
			page += 6
			listhtml += utils.postHtml(url, compression=False, form_data={'period': 'week', 'popular_source': 'blogs', 'popular_mode': popular_mode, 'popular_off': page})
		else:
			listhtml = utils.getHtml(url)
	except Exception as e:
		return None
	if popular_mode and page:
		content = listhtml
	else:
		content = listhtml.replace("\'",'"')
	match_big = re.compile('''data-title="([^"]+)".+?<a href="([^"]+)">.+?<img class=.+?;" src="([^"]+)".+?<span class="duration_small".+?" ; title=".+?">(.+?)<''', re.DOTALL | re.IGNORECASE).findall(content)
	for name,video,img, duration in match_big:
		duration = duration.strip()
		if duration == '??':
			continue
		try:
			name=name.split('\n')[0]
			name=name.split('#')[0]
		except:
			pass
		name = utils.cleantext(name) + " [COLOR deeppink]" + duration + "[/COLOR]"
		utils.addDownLink(name, make_url(video), 652, make_url(img), '')
	match_small = re.compile('''<div class='blog_post_small'>.*?<div class='blog_post_small_title'>(.*?)</div>.*?href.*?href='([^']+)'.*? src='([^']+)'[^>]''', re.DOTALL | re.IGNORECASE).findall(content)
	for name, video, img in match_small:
		name = utils.cleantext(re.sub("<.*?>", '', name))
		utils.addDownLink(name, make_url(video), 652, make_url(img), '')
	if popular_mode:
		page = page + 6 if page else 12
		utils.addDir('Next Page', 'https://yourporn.sexy/php/popular_append.php', 651, '', page, section=popular_mode)
	else:
		try:
			next_page = re.compile('''<a href='([^']+)' class='tdn'><div class='next''', re.DOTALL | re.IGNORECASE).search(content).group(1)
			next_page = make_url(next_page)
			utils.addDir('Next Page' , next_page, 651, '')
		except:
			pass
	xbmcplugin.endOfDirectory(utils.addon_handle)
예제 #12
0
def List(url, page=0):
    try:
        postRequest = {'page' : str(page)}
        response = utils.postHtml(url, form_data=postRequest,headers={},compression=False)
    except:
        return None
    match = re.compile(r'<div class="video-item">[^"]+"/watch/([^"]+)"[^/]+/[^/]+/[^/]+/([^"]+)" alt="([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    for video, img, name in match:
        name = utils.cleantext(name)
        img = "https:/" + img
        utils.addDownLink(name, video, 612, img, '')
    npage = page + 1
    utils.addDir('Next Page (' + str(npage) + ')', url, 611, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
예제 #13
0
파일: daftsex.py 프로젝트: gojida66/gojida
def List(url, page=0):
    try:
        postRequest = {'page' : str(page)}
        response = utils.postHtml(url, form_data=postRequest,headers={},compression=False)
    except:
        return None
    match = re.compile('<div class="video-item">.*?a href="([^"]+)".*?<img src="([^"]+)" alt="([^"]+)".*?<span class="video-time">([^<]+)', re.DOTALL | re.IGNORECASE).findall(response)
    for video, img, name, length in match:
        video = 'https://daftsex.com' + video
        name = '[COLOR hotpink]' + length + '[/COLOR] ' + utils.cleantext(name)
        utils.addDownLink(name, video, 612, img, '')
    npage = page + 1
    utils.addDir('Next Page (' + str(npage) + ')', url, 611, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
예제 #14
0
def List(url, page=0):
    try:
        postRequest = {'page' : str(page)}
        response = utils.postHtml(url, form_data=postRequest,headers={},compression=False)
    except:
        return None
    match = re.compile('<div class="video-item">.*?a href="([^"]+)".*?<img src="([^"]+)" alt="([^"]+)".*?<span class="video-time">([^<]+)', re.DOTALL | re.IGNORECASE).findall(response)
    for video, img, name, length in match:
        video = 'https://daftsex.com' + video
        name = utils.cleantext(name) + ' [COLOR hotpink]' + length + '[/COLOR]'
        utils.addDownLink(name, video, 612, img, '')
    npage = page + 1
    utils.addDir('Next Page (' + str(npage) + ')', url, 611, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
예제 #15
0
def List(url, page=0):
    try:
        postRequest = {'page': str(page)}
        response = utils.postHtml(url, form_data=postRequest, headers={}, compression=False)
    except:
        return None
    match = re.compile(r'class="video-item">.+?href="([^"]+).+?src="([^"]+)"\s*alt="([^"]+).+?time">([^<]+)', re.DOTALL | re.IGNORECASE).findall(response)
    for video, img, name, length in match:
        video = site.url + video
        name = utils.cleantext(name) + ' [COLOR hotpink]' + length + '[/COLOR]'
        site.add_download_link(name, video, 'Playvid', img, '')
    npage = page + 1
    site.add_dir('Next Page (' + str(npage) + ')', url, 'List', site.img_next, npage)
    utils.eod()
예제 #16
0
def yourporn_list(url, page=None, section=None):
    popular_mode = section if section else None
    try:
        if popular_mode and page:
            listhtml = utils.postHtml(url, compression=False, form_data={'period': 'week', 'popular_source': 'blogs', 'popular_mode': popular_mode, 'popular_off': page})
            page += 6
            listhtml += utils.postHtml(url, compression=False, form_data={'period': 'week', 'popular_source': 'blogs', 'popular_mode': popular_mode, 'popular_off': page})
        else:
            listhtml = utils.getHtml(url)
    except Exception as e:
        return None
    if popular_mode and page:
        content = listhtml
    else:
        content = re.compile('''<div id='(?:posts_container|search_container|topPosts_container)'.*?>(.*?)<div id=['"](?:center_control|footer)['"]>''', re.DOTALL | re.IGNORECASE).search(listhtml).group(1)
    match_big = re.compile('''<div class='post_el'.*?<div class='vid_container'>.*? src='([^']+)'.*?href='([^']+)'.*?title='([^']+)'.*?<span class='duration.*?'>([^<]+)<''', re.DOTALL | re.IGNORECASE).findall(content)
    for img, video, name, duration in match_big:
        duration = duration.strip()
        if duration == '??':
            continue
        name = utils.cleantext(name) + " [COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, make_url(video), 652, make_url(img), '')
    match_small = re.compile('''<div class='blog_post_small'>.*?<div class='blog_post_small_title'>(.*?)</div>.*?href.*?href='([^']+)'.*? src='([^']+)'[^>]''', re.DOTALL | re.IGNORECASE).findall(content)
    for name, video, img in match_small:
        name = utils.cleantext(re.sub("<.*?>", '', name))
        utils.addDownLink(name, make_url(video), 652, make_url(img), '')
    if popular_mode:
        page = page + 6 if page else 12
        utils.addDir('Next Page', 'https://yourporn.sexy/php/popular_append.php', 651, '', page, section=popular_mode)
    else:
        try:
            next_page = re.compile('''<a href='([^']+)' class='tdn'><div class='next''', re.DOTALL | re.IGNORECASE).search(content).group(1)
            next_page = make_url(next_page)
            utils.addDir('Next Page' , next_page, 651, '')
        except:
            pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
예제 #17
0
def hentaidude_play(url, name, download=None):
    listhtml = utils.getHtml(url)
    matches = re.compile(r"id:\s*'([^']+)',\s*nonce:\s*'([^']+)'", re.DOTALL | re.IGNORECASE).findall(listhtml)
    if matches:
        posturl = site.url + '/wp-admin/admin-ajax.php'
        postdata = {'action': 'msv-get-sources',
                    'id': matches[0][0],
                    'nonce': matches[0][1]}
        postreturn = utils.postHtml(posturl, form_data=postdata)
        sources = json.loads(postreturn)['sources']
        for i in sources:
            videourl = sources[i]

        vp = utils.VideoPlayer(name, download=download)
        vp.play_from_direct_link(videourl)
예제 #18
0
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    try:
        html = utils.getHtml(url, '')
    except:
        return None
    match = re.compile(
        "action: 'msv-get-sources'.+?id: '(.+?)'.+?nonce: '(.+?)'",
        re.DOTALL | re.IGNORECASE).findall(html)[0]
    payload = {'action': 'msv-get-sources', 'id': match[0], 'nonce': match[1]}
    sources = utils.postHtml('https://hentaidude.com/wp-admin/admin-ajax.php',
                             form_data=payload,
                             compression=False,
                             NoCookie=None)
    if not sources: return
    sJson = json.loads(sources)
    if not sJson['success']: return
    videourl = sJson['sources']['video-source-0']
    vp.play_from_direct_link(videourl)
예제 #19
0
def Collection(url):
    listhtml = utils.getHtml(url)
    match = re.compile(
        r"data-token='([^']+)'\s*data-account-id='([^']+)'\s*data-drive-id='([^']+)'.+?data-path='([^']+)'",
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    if match:
        listtoken, account_id, drive_id, folderPath = match[0]
        posturl = 'https://www1.javhoho.com/wp-admin/admin-ajax.php'
        form_data = {}
        form_data['listtoken'] = listtoken
        form_data['account_id'] = account_id
        form_data['drive_id'] = drive_id
        form_data['folderPath'] = folderPath
        form_data['lastFolder'] = ''
        form_data['sort'] = 'name:asc'
        form_data['action'] = 'shareonedrive-get-filelist'
        form_data['_ajax_nonce'] = '44a0ac11f9'
        form_data['mobile'] = 'false'
        form_data['query'] = ''
        response = utils.postHtml(posturl, form_data=form_data)
    else:
        return
    match = re.compile(
        r'''class='entry file.+?data-src='([^']+)'(.+?)<span>([^<]+)<.+?<source data-src=\\"([^"]+)"''',
        re.DOTALL | re.IGNORECASE).findall(response)
    if match:
        for img, duration, name, videourl in match:
            m = re.compile(r"class='entry-duration'.+?>([\s\d:]+)<",
                           re.DOTALL | re.IGNORECASE).findall(duration)
            duration = m[0] if m else ''
            name = name.replace('\\', '')
            img = img.replace('\\', '')
            videourl = videourl.replace('\\', '')
            site.add_download_link(name,
                                   videourl,
                                   'Playvideo',
                                   img,
                                   duration=duration)
        utils.eod()