Esempio n. 1
0
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "", "Loading video page", "")
    html = utils.getHtml(url)
    videourl = re.compile('<iframe src="([^"]+)" ',
                          re.DOTALL | re.IGNORECASE).findall(html)[0]
    if '/player/' in videourl:
        videourl = videourl.replace('/player/?data=', '')
        videourl = 'https://www.xn--xvideos-espaol-1nb.com/player/getVideo.php?data=' + videourl
        listjson = utils.getHtml(videourl, '')
        listjson = listjson.replace('\/', '/')
        videourl = re.compile('"videoUrl":"([^"]+)"',
                              re.DOTALL | re.IGNORECASE).findall(listjson)[0]
        #        match = re.compile('"(videoUr[^"]+)":"([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listjson)
        #        links = {}
        #        for type, videourl in match:
        #            utils.kodilog(videourl)
        #            links['Direct ' + type] = videourl
        #        videourl = utils.selector('Select link', links, dont_ask_valid=False)
        vp.play_from_direct_link(videourl)
    else:
        if vp.resolveurl.HostedMediaFile(videourl):
            vp.play_from_link_to_resolve(videourl)
        else:
            if 'pornhub' in videourl:
                from resources.lib.sites import pornhub
                videourl = videourl.replace('embed/',
                                            'view_video.php?viewkey=')
                pornhub.Playvid(videourl, name)
            else:
                utils.kodilog(' ???: ' + videourl)
Esempio n. 2
0
def ypp_list(url):
    #    utils.kodilog('RAW URL: ' + url)
    sort = ('&s={}'.format(get_ypp_sort(True)) if get_ypp_sort(True) else
            '') if len(url.split('/')) >= 4 and url.split('/')[3].startswith(
                'search') or url.endswith('date') else '/?s={}'.format(
                    get_ypp_sort())
    #    utils.kodilog('SORT: ' + sort)
    url = url + sort if sort not in url else url
    utils.kodilog(url.split('/')[2])
    utils.kodilog(url)
    try:
        listhtml = utils.getHtml(url)
    except Exception as e:
        return None
    match = re.compile(
        '''div class="well well-sm".*?href="([^"]+)".*?src="([^"]+)".*?alt="([^"]+)"(.*?)duration">([^<]+)<''',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    for video, img, name, hd, duration in match:
        duration = duration.strip()
        hd_text = ' [COLOR orange]HD[/COLOR] ' if 'HD' in hd else ''
        name = utils.cleantext(
            name) + hd_text + " [COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, make_url(video), 692, make_url(img), '')
    try:
        #Test
        next_page = re.compile('''a href="([^"]+)" class="prevnext"''',
                               re.DOTALL | re.IGNORECASE).findall(listhtml)[-1]
        utils.addDir('Next Page', make_url(next_page), 691, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 3
0
def ypp_search(url, keyword=None):
    if not keyword:
        utils.searchDir(url, 694)
    else:
        url = url + keyword.replace(' ', '-') + '/'
        utils.kodilog('SEARCH URL: ' + url)
        ypp_list(url)
Esempio n. 4
0
def ListHD(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        return None
    match = re.compile(
        'class="ml-item">.+?href="(.+?)".+?oldtitle="(.+?)".+?<img data-original="(.+?)"',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    xbmcgui.Dialog().textviewer(url, str(match[0]))
    utils.kodilog(str(match[0]))
    for url1, title, img in match:
        #utils.addDownLink(title.replace("&#8217;", "'").replace('&#8211;', '-'), url1, 602, img, '')
        utils.addDownLink(utils.cleantext(title), url1.strip(), 602, img, '')
    #try:
    match = re.compile('/page/(.+?)', re.DOTALL | re.IGNORECASE).findall(url)
    if match:
        thisP = match[0]
        match = re.compile('rel=\'nofollow\' href=\'(.+?)\'',
                           re.DOTALL | re.IGNORECASE).findall(listhtml)
        if match:
            baseUrl = match[0].split('/')
            totalPages = baseUrl[-1]
        else:
            baseUrl = url.split('/')
            totalPages = '1'
        if int(thisP) + 1 <= int(totalPages):
            nextP = int(thisP) + 1
            nextUrl = '/'.join(baseUrl[:-1]) + '/' + str(nextP)
        else:
            nextP = int(thisP) + 1
            nextUrl = '/'.join(url.split('/')[:-1]) + '/' + str(nextP)
        utils.addDir('Next Page (' + str(nextP) + '/' + totalPages + ')',
                     nextUrl, 601, '', '')
    #except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 5
0
def Playlists(url, page=1):
    cathtml = utils.getHtml(url, site.url)
    img = str(randint(1, 4))
    match = re.compile(
        r'class="item\s*".+?href="([^"]+)"\s*title="([^"]+)".+?class="thumb video'
        + img + '.+?data-original="([^"]+)".+?class="totalplaylist">([^<]+)',
        re.DOTALL | re.IGNORECASE).findall(cathtml)
    for catpage, name, img, name2 in match:
        name = utils.cleantext(name) + ' [COLOR cyan][{}][/COLOR]'.format(
            name2)
        site.add_dir(name, catpage, 'List', img, 1)
    if re.search(r'<li\s*class="next"><a', cathtml, re.DOTALL | re.IGNORECASE):
        lastp = re.compile(r':(\d+)">Last',
                           re.DOTALL | re.IGNORECASE).findall(cathtml)
        lastp = '/{}'.format(lastp[0]) if lastp else ''
        if not page:
            page = 1
        npage = page + 1
        if 'from={0:02d}'.format(page) in url:
            nurl = url.replace('from={0:02d}'.format(page),
                               'from={0:02d}'.format(npage))
        else:
            utils.kodilog(' Playlists pagination error')
            nurl = url
        site.add_dir(
            '[COLOR yellow]Next Page...[/COLOR] (' + str(npage) + lastp + ')',
            nurl, 'Playlists', site.img_next, npage)
    utils.eod()
Esempio n. 6
0
def datoporn_list(url):
    try:
        listhtml = utils.getHtml(url)
    except Exception as e:
        return None
    # match = re.compile('''href="([^"]+)" class="video200 ">.+?url\('(.+?)'.+?<span>(.+?)<.+?class="title">(.+?)<''', re.DOTALL | re.IGNORECASE).findall(listhtml)
    match = re.compile(
        '''class="vid_block".+?href="([^"]+)".+?background: url\('([^']+)'\).+?span>([^<]+)<.+?class="link"><b>([^<]+)</b>''',
        re.DOTALL | re.IGNORECASE).findall(listhtml)

    for video, img, duration, name in match:
        duration = duration.strip()
        name = utils.cleantext(
            name) + " [COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, video, 672, img, '')
    try:
        #        next_page = re.compile('''<a href='([^']+)'>Next''', re.DOTALL | re.IGNORECASE).search(listhtml).group(1)
        next_page = re.compile('''a class='page-link' href='([^']+)'>Next''',
                               re.DOTALL
                               | re.IGNORECASE).search(listhtml).group(1)
        utils.kodilog(next_page)
        page_number = ''.join(
            [nr for nr in next_page.split('=')[-1] if nr.isdigit()])
        utils.addDir('Next Page (' + page_number + ')', next_page, 671, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 7
0
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "", "Loading video page", "")

    videopage = utils.getHtml(url)
    #    utils.kodilog(videopage)
    refurl = re.compile('<iframe[^>]+src="([^"]+)"',
                        re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    vp.progress.update(50, "", "Loading video page", "")
    utils.kodilog(refurl)
    refpage = utils.getHtml(refurl)
    #    videourl = re.compile('JuicyCodes.Run\(([^\)]+)\)', re.DOTALL | re.IGNORECASE).findall(refpage)[0]
    videourl = re.compile('>(eval.+?)<\/script>',
                          re.DOTALL | re.IGNORECASE).findall(refpage)[0]
    #    videourl = videourl.replace('"+"','').replace('"','')
    #    videourl = base64.b64decode(videourl)

    videourl = utils.unpack(videourl)
    utils.kodilog(videourl)
    videolink = re.compile('file:"([^"]+)"',
                           re.DOTALL | re.IGNORECASE).findall(videourl)[0]
    #    list = {}
    #    for url, quality in videolinks:
    #        list[quality] = url
    #    url = utils.selector('Select quality', list, dont_ask_valid=True,  sort_by=lambda x: int(x[:-1]), reverse=True)
    #    if not url:
    #        return
    videolink = videolink + '|Referer=' + refurl
    vp.play_from_direct_link(videolink)
Esempio n. 8
0
def List(url):
    try:
        listhtml = utils.getHtml(url)
    except:
        utils.kodilog('site error')
        return None
    match = re.compile(
        'class="item-thumbnail".+?href="([^"]+)">.+?data-src="([^"]+)".+?title="([^"]+)"',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    if match:
        for videopage, img, name in match:
            name = utils.cleantext(name)
            utils.addDownLink(name, videopage, 312, img, '')
    else:  # search
        match = re.compile(
            'class="item-thumbnail".+?href="([^"]+)".+?title="([^"]+)".+?data-src="([^"]+)"',
            re.DOTALL | re.IGNORECASE).findall(listhtml)
        for videopage, name, img in match:
            name = utils.cleantext(name)
            utils.addDownLink(name, videopage, 312, img, '')
    try:
        next_page = re.compile('href="([^"]+)">&raquo;<').findall(listhtml)[0]
        page_nr = re.findall('\d+', next_page)[-1]
        utils.addDir('Next Page (' + page_nr + ')', next_page, 311, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
def thepornfull_play(url, name, download=None):
    utils.kodilog(url)
    vp = utils.VideoPlayer(name, download=download)
    videohtml = utils.getHtml(url, site.url)
    match = re.compile('iframe src="([^"]+)"',
                       re.IGNORECASE | re.DOTALL).search(videohtml)
    if match:
        iframeurl = match.group(1)
        headers = {'referer': iframeurl}
        iframehtml = utils.getHtml(iframeurl, url)
        iframefile = re.compile('file: "([^"]+)',
                                re.IGNORECASE | re.DOTALL).search(iframehtml)
        if iframefile:
            videourl = iframefile.group(1)
            videourl = "{0}|{1}".format(videourl,
                                        urllib_parse.urlencode(headers))
            utils.kodilog(videourl)
            iconimage = xbmc.getInfoImage("ListItem.Thumb")
            subject = xbmc.getInfoLabel("ListItem.Plot")
            listitem = xbmcgui.ListItem(name)
            listitem.setArt({
                'thumb': iconimage,
                'icon': "DefaultVideo.png",
                'poster': iconimage
            })
            listitem.setInfo(
                'video', {
                    'Title': name,
                    'Genre': 'P**n',
                    'plot': subject,
                    'plotoutline': subject
                })
            listitem.setMimeType('application/vnd.apple.mpegurl')
            listitem.setContentLookup(False)
            xbmc.Player().play(videourl, listitem)
Esempio n. 10
0
def ypp_list(url):
    utils.kodilog('RAW URL: ' + url)
    sort = ''
    url = url + sort if sort not in url else url
    try:
        listhtml = utils.getHtml(url)
    except Exception as e:
        return None
    match = re.compile(
        '''div class="thumb item ".*?href="([^"]+)".*?<img src="([^"]+)".*?alt="([^"]+)".*?duration">([^<]+)<.*?thumb__bage">([^<]+)<''',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    for video, img, name, duration, hd in match:
        duration = duration.strip()
        # Changed labelling adding Video quality
        hd = utils.cleantext(hd)
        hd_text = " [COLOR orange]" + hd + "[/COLOR] "
        name = utils.cleantext(
            name) + hd_text + " [COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, make_url(video), 692, make_url(img), '')
    try:
        next_page = re.compile('pagination__link" href="([^"]+)">Next<',
                               re.DOTALL | re.IGNORECASE).findall(listhtml)[-1]
        utils.addDir('Next Page', make_url(next_page), 691, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 11
0
def restore_fav():
    path = utils.dialog.browseSingle(1, 'Select backup file', 'myprograms')
    if not path:
        return
    import json
    import gzip
    try:
        if utils.PY3:
            with gzip.open(path, "rt", encoding="utf-8") as fav_file:
                backup_content = json.load(fav_file)
        else:
            with gzip.open(path, "rb") as fav_file:
                backup_content = json.load(fav_file)
    except (ValueError, IOError):
        utils.notify("Error", "Invalid backup file")
        return
    if not backup_content["meta"]["type"] == "cumination-favorites":
        if backup_content["meta"]["type"] == "uwc-favorites":
            from resources.lib.convertfav import convertfav
            backup_content = convertfav(backup_content)
        else:
            utils.notify("Error", "Invalid backup file")
            return
    favorites = backup_content["data"]
    if not favorites:
        utils.notify("Error", "Empty backup")
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("select 'custom_' || name || '_by_' || author from custom_sites")
    custom_sites = [cs[0] for cs in c.fetchall()]
    conn.close()
    added = 0
    skipped = 0
    for favorite in favorites:
        if select_favorite(favorite["url"]):
            u = favorite["url"] if six.PY3 else favorite["url"].encode('utf8')
            utils.kodilog('{} is already in favorites, skipping'.format(u))
            skipped += 1
        elif favorite["mode"].startswith('custom_') and favorite["mode"].split(
                '.')[0] not in custom_sites:
            utils.kodilog('{} is not installed, skipping'.format(
                favorite["mode"].split('.')[0]))
            skipped += 1
        else:
            duration = favorite["duration"] if "duration" in favorite.keys(
            ) else ""
            quality = favorite["quality"] if "quality" in favorite.keys(
            ) else ""
            addFav(favorite["mode"], favorite["name"], favorite["url"],
                   favorite["img"], duration, quality)
            added += 1
    xbmc.executebuiltin('Container.Refresh')
    utils.dialog.ok(
        "Restore complete",
        "Restore skips items that are already present in favorites to avoid duplicates[CR]"
        "and favorites from not installed custom sites[CR]"
        "Added: {0}[CR]Skipped: {1}".format(added, skipped))
Esempio n. 12
0
def Search(url, keyword=None):
    searchUrl = url
    if not keyword:
        utils.searchDir(url, 314)
    else:
        title = keyword.replace(' ', '+')
        searchUrl = searchUrl + title
        utils.kodilog(searchUrl)
        List(searchUrl)
Esempio n. 13
0
def Search(url, keyword=None):
    searchUrl = url
    if not keyword:
        site.search_dir(url, 'Search')
    else:
        title = keyword.replace(' ', '+')
        searchUrl = searchUrl + title
        utils.kodilog("NetFlixPorno Searching URL: " + searchUrl)
        List(searchUrl)
Esempio n. 14
0
def Playvid(url, name, download=None):
    player = utils.VideoPlayer(name, download, regex='[sS][rR][cC]="([^"]+)"')
    player.progress.update(25, "", "Loading video page", "")
    videopage = utils.getHtml(url, '')
    links = re.compile('<iframe src="([^"]+)"',
                       re.DOTALL | re.IGNORECASE).findall(videopage)
    for link in links:
        utils.kodilog(link)
        videopage += utils.getHtml(link, url)
    player.play_from_html(videopage)
Esempio n. 15
0
def site_list():
    custom_listitems = favorites.get_custom_listitems()
    custom_listitems_dict = {}
    for x in custom_listitems:
        custom_listitems_dict[x[0]] = x[1]
    for x in sorted(AdultSite.get_sites(), key=lambda y: y.get_clean_title().lower(), reverse=False):
        if x.custom:
            utils.kodilog('{0}: {1}'.format(utils.i18n('list_custom'), x.title), xbmc.LOGDEBUG)
        title = x.title
        if title in custom_listitems_dict.keys():
            title = '{} [COLOR red]{}[/COLOR]'.format(title, ''.ljust(custom_listitems_dict[title], '*'))
        url_dispatcher.add_dir(title, x.url, x.default_mode, x.image, about=x.about, custom=x.custom)
    utils.eod(basics.addon_handle, False)
Esempio n. 16
0
def Stars(url):
    print "mrsexe::Stars " + url
    starhtml = utils.getHtml(url, '')
    match = re.compile(r'<h3 class="filles">Les filles de MrSexe</h3>(.*?)<ul class="right pagination">', re.DOTALL | re.IGNORECASE).findall(starhtml)
    match1 = re.compile(r'<figure>\s*<a href="(.+?)"><img src="(.+?)" alt="".+?</figure>.+?class="infos".+?a href=".+?">([^<]+)</a></h5>\s*([0-9]+) vid', re.DOTALL | re.IGNORECASE).findall(match[0])
    for starpage, img, name, vidcount in match1:
        img = 'https:' + img
        name = name + " (" + vidcount + " Videos)"
        utils.kodilog(img)
        utils.addDir(name, 'http://www.mrsexe.com/' + starpage, 401, img)
    try:
        nextp=re.compile(r'<li class="arrow"><a href="(.+?)">suivant</li>').findall(starhtml)
        utils.addDir('Next Page', 'http://www.mrsexe.com/' + nextp[0], 405,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 17
0
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "", "Loading video page", "")
    vidsite = utils.getHtml(url, 'https://daftsex.com/')

    videourl = re.compile('<iframe.+?src="(https://da{0,1}xa{0,1}b\.[ct]om{0,1}/[^"]+)"', re.DOTALL | re.IGNORECASE).findall(vidsite)[0]
    videopage = utils.getHtml(videourl, 'https://daftsex.com/')
    try:	
        match = re.compile('id: "([^"]+)_([^"]+)".+:"(\d+)\.([^"]+)"}', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
        (id1, id2, res, extra) =  match
        video =  id1 + '/' + id2 + '/' + res + '.mp4?extra=' + extra
	vp.play_from_direct_link(FindServer(video, vp))
    except:
        video = 'https://vk.com/video' + re.compile("Fav.Toggle\(this, '([^']+)'", re.DOTALL | re.IGNORECASE).findall(vidsite)[0]
        utils.kodilog(video)
        vp.play_from_link_to_resolve(video)
Esempio n. 18
0
def List(url):
    utils.kodilog(url)
    siteurl = getBaselink(url)
    order = utils.addon.getSetting('heresortorder') if utils.addon.getSetting(
        'heresortorder') else ''
    if not '/' + order in url:
        if '?' in url:
            pageurl = url + '&o=' + order[:-1]
        else:
            pageurl = url + order
    else:
        pageurl = url
    utils.kodilog(pageurl)

    try:
        listhtml = utils.getHtml(pageurl, '')
    except:
        return None

    match = re.compile(
        r'class="video".+?href="([^"]+)"\s*title="([^"]+)".+?src="([^"]+)".+?class="duration"><strong>([^<]+)<\/strong>([^<]+)<',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, name, img, hd, duration in match:
        name = utils.cleantext(name)
        site.add_download_link(name,
                               siteurl[:-1] + videopage,
                               'Playvid',
                               siteurl[:-1] + img,
                               name,
                               duration=duration,
                               quality=hd)

    nextp = re.compile(
        r'href="([^"]+)" class="prevnext" title="Go to next page!"',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    if nextp:
        nextp = siteurl[:-1] + nextp[0]
        np = re.findall(r'\d+', nextp)[-1]
        lp = re.compile(r'title="Go to last page!">(\d+)<',
                        re.DOTALL | re.IGNORECASE).findall(listhtml)
        if lp:
            lp = '/' + lp[0]
        else:
            lp = ''
        site.add_dir('Next Page ({}{})'.format(np, lp), nextp, 'List',
                     site.img_next)
    utils.eod()
Esempio n. 19
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
Esempio n. 20
0
def PTPlayvid(url, name, download=None):
    progress.create('Play video', 'Searching for videofile.')
    progress.update(25, "", "Loading video page", "")
    videopage = utils.getHtml(url, '')
    sources = {}
    try:
        sources['2160p 4k'] = re.compile("video_alt_url5: '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    except IndexError:
        pass
    try:
        sources['1440p'] = re.compile("video_alt_url4: '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    except IndexError:
        pass
    try:
        sources['1080p'] = re.compile("video_alt_url3: '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    except IndexError:
        pass
    try:
        sources['720p'] = re.compile("video_alt_url2: '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    except IndexError:
        pass
    try:
        sources['480p'] = re.compile("video_alt_url: '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    except IndexError:
        pass
    try:
        sources['360p'] = re.compile("video_url: '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    except IndexError:
        pass
    videourl = utils.selector('Select quality', sources, dont_ask_valid=True, sort_by=lambda x: int(''.join([y for y in x if y.isdigit()])), reverse=True)
    if not videourl:
        progress.close()
        return
    utils.kodilog(videourl)
    progress.update(75, "", "Video found", "")
    progress.close()
    if download == 1:
        utils.downloadVideo(videourl, name)
    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)
def List(url):
    utils.kodilog(url)
    try:
        listhtml = utils.getHtml(url, '')
    except:
        return None
    match = re.compile(
        r'data-video="(.+?)">.+?<img src="(.+?)" alt="(.+?)".+?<span>(.+?) Video</span>',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name, duration in match:
        name = utils.cleantext(name + ' [COLOR deeppink]' + duration +
                               '[/COLOR]')
        utils.addDownLink(name, videopage, 492, img, '')
    try:
        nextp = re.compile('<a href=\'(.+?)\' class="next">').findall(listhtml)
        xbmc.log(nextp[0])
        utils.addDir('Next Page', url[:url.rfind('/') + 1] + nextp[0], 491, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 22
0
def List(url):
    utils.kodilog(url)
    siteurl = getBaselink(url)
    listhtml = utils.getHtml(url)
    match = re.compile(r'(?:class="thumb thumb-video|class="thumb-bl thumb-video|class="item  ").+?href="([^"]+)"\s*title="([^"]+)".+?data-(?:original|src)="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for video, name, img in match:
        name = utils.cleantext(name)
        img = 'https:' + img if img.startswith('//') else img
        video = siteurl[:-1] + video if video.startswith('/') else video

        cm_related = (utils.addon_sys + "?mode=" + str('pornhat.ContextRelated') + "&url=" + urllib_parse.quote_plus(video))
        cm = [('[COLOR violet]Related videos[/COLOR]', 'RunPlugin(' + cm_related + ')')]

        site.add_download_link(name, video, 'Play', img, name, contextm=cm)
    nextp = re.compile(r'href="([^"]+)"[^>]*>\s*Next', re.DOTALL | re.IGNORECASE).search(listhtml)
    if nextp:
        nextp = nextp.group(1)
        nextp = siteurl[:-1] + nextp if nextp.startswith('/') else nextp
        np = re.findall(r'\d+', nextp)[-1]
        site.add_dir('[COLOR hotpink]Next Page...[/COLOR] ({0})'.format(np), nextp, 'List', site.img_next)
    utils.eod()
Esempio n. 23
0
def ListLive(url, page=1, searchStr=None):
    if utils.addon.getSetting("chaturbate") == "true":
        clean_database(False)
    ssearch = "x['LiveStatus']=='live'"
    if searchStr:
        #xbmcgui.Dialog().textviewer(url, str(searchStr))
        utils.kodilog('STREAMATE URL cu search: ' + url)
        if 'name' in searchStr:
            ssearch = ssearch + ' and ' + "'" + searchStr['name'].lower(
            ) + "' in x['Nickname'].lower()"
        if 'age' in searchStr:
            ssearch = ssearch + ' and ' + "x['Age']==int(" + str(
                searchStr['age']) + ")"
        if 'country' in searchStr:
            ssearch = ssearch + ' and ' + "'" + searchStr['country'].lower(
            ) + "' in x['Country'].lower()"
        if 'gender' in searchStr:
            ssearch = ssearch + ' and ' + "'" + str(
                searchStr['gender']).lower() + "' in str(x['Gender'])"
        #xbmcgui.Dialog().textviewer(url, ssearch)

    try:
        data = utils.getHtml(url + "&page_number=" + str(page))
    except:
        return None
    model_list = json.loads(data)

    #xx = sorted(list(set([x['Gender'] for x in model_list['Results']])))
    imgBase = "https://m1.nsimg.net/biopic/original4x3/%s" if utils.addon.getSetting(
        "bio_pic") == "true" else "https://m1.nsimg.net/media/snap/%s.jpg"
    for camgirl in (x for x in model_list['Results'] if eval(ssearch)):
        performerID = str(camgirl['PerformerId'])
        img = imgBase % performerID
        name = camgirl['Nickname']
        if (not name) or name == ' ' or name == '': continue
        utils.addDownLink(name, performerID, 582, img, '')
    #npage = page + 1
    #utils.addDir('Next Page (' + str(npage) + ')', url, 581, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
    return
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        return None
    match = re.compile(
        'class="list__item_link"><a href="([^"]+)" title="([^"]+)".*?data-original="([^"]+)".*?<time>(.*?)</time>',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    utils.kodilog(match)
    for videopage, name, img, duration in match:
        videopage = siteurl + videopage
        name = utils.cleantext(name)
        name = "[COLOR deeppink]" + duration + "[/COLOR] " + name
        img = 'http:' + img
        utils.addDownLink(name, videopage, 712, img, '')
    try:
        nextp = re.compile(
            'class="pagination__item pagination__next".+?href="([^"]+)"',
            re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', siteurl + nextp[0], 711, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 25
0
def PPlayvid(url, name, download=None):
    utils.kodilog(url)
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "", "Loading video page", "")
    videopage = utils.getHtml(url)
    if 'porn00' in url:
        alternatives = re.compile('div id="alternatives".+?href="([^"]+)"',
                                  re.DOTALL | re.IGNORECASE).findall(videopage)
        for alternative in alternatives:
            videopage += utils.getHtml(alternative)
        links = {}
        videolinks = re.compile('iframe.+?src="([^"]+)" width',
                                re.DOTALL | re.IGNORECASE).findall(videopage)
        for link in videolinks:
            if vp.resolveurl.HostedMediaFile(
                    link) and 'www.porn00.org' not in link:
                links[link.split('/')[2]] = link
            if 'www.porn00.org/player/' in link:
                html = utils.getHtml(link)
                srcs = re.compile('''<source src='([^']+)' title="([^"]+)"''',
                                  re.DOTALL | re.IGNORECASE).findall(html)
                for (vlink, title) in srcs:
                    links['direct ' + title] = vlink + '|Referer=' + link
        videourl = utils.selector('Select link',
                                  links,
                                  dont_ask_valid=False,
                                  reverse=True)
        vp.progress.update(75, "", "Loading video page", "")
        if '|Referer' in videourl:
            vp.play_from_direct_link(videourl)
        else:
            vp.play_from_link_to_resolve(videourl)
    if 'pornaq' in url:
        videourl = re.compile("<source src='([^']+)' title",
                              re.DOTALL | re.IGNORECASE).findall(videopage)[0]
        utils.kodilog(videourl)
        vp.play_from_direct_link(videourl + '|Referer=' + url)
Esempio n. 26
0
def List(url):
    site = url.split('/api')[0]
    m = re.search('\.(\d+)\.', url)
    if m:
        page = int(m.group(1))
    else:
        page = 1

    listjson = utils.getHtml(url, url)
    js = json.loads(listjson)

    if "videos" in js.keys():
        for video in js["videos"]:
            videopage = site + "/videos/" + video["video_id"] + "/" + video[
                "dir"] + "/"
            img = video["scr"]
            name = video["title"]
            name = name.encode("UTF-8")
            dur = video["duration"]
            hd = " "
            if "props" in video.keys():
                if video["props"]:
                    if "hd" in video["props"].keys():
                        if video["props"]["hd"] == "1":
                            hd = " [COLOR orange]HD[/COLOR] "
                        else:
                            utils.kodilog(name)
                            utils.kodilog(video["props"]["hd"])
            n = hd + "[COLOR deeppink]" + dur + "[/COLOR]"
            name += n.encode("UTF-8")
            utils.addDownLink(name, videopage, 382, img, '')

        npage = page + 1
        url = url.replace('.' + str(page) + '.', '.' + str(npage) + '.')
        utils.addDir('Next Page (' + str(page) + ')', url, 381, '')

    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 27
0
def ypp_list(url):
    utils.kodilog('RAW URL: ' + url)
    #    sort = ('&s={}'.format(get_ypp_sort(True)) if get_ypp_sort(True) else '') if len(url.split('/')) >= 4 and url.split('/')[3].startswith('search') or url.endswith('date') else '/?s={}'.format(get_ypp_sort())
    sort = ''
    #    utils.kodilog('SORT: ' + sort)
    url = url + sort if sort not in url else url
    #    utils.kodilog(url.split('/')[2])
    #    utils.kodilog(url)
    try:
        listhtml = utils.getHtml(url)


#        utils.kodilog(listhtml)
    except Exception as e:
        return None
    match = re.compile(
        '''div class="thumb item ".*?href="([^"]+)".*?<img src="([^"]+)".*?alt="([^"]+)".*?duration">([^<]+)<.*?thumb__bage">([^<]+)<''',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    for video, img, name, duration, hd in match:
        #        utils.kodilog('Vid Quality: ' + hd)
        duration = duration.strip()
        #        hd_text = ' [COLOR orange]HD[/COLOR] ' if 'HD' in hd else ''
        #       Changed labelling adding Video quality
        hd = utils.cleantext(hd)
        hd_text = " [COLOR orange]" + hd + "[/COLOR] "
        #        utils.kodilog('Vid Quality Printed: ' + hd_text)
        name = utils.cleantext(
            name) + hd_text + " [COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, make_url(video), 692, make_url(img), '')
    try:
        next_page = re.compile('pagination__link" href="([^"]+)">Next<',
                               re.DOTALL | re.IGNORECASE).findall(listhtml)[-1]
        utils.addDir('Next Page', make_url(next_page), 691, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 28
0
def List(channel, section, page=0):
    if section == 0:
        data = VideoListData(page, channel)
    elif section == 1:
        data = VideoListStudio(page, channel)
    elif section == 2:
        data = VideoListPornstar(page, channel)
    elif section == 3:
        data = CatListData(page, channel)
    try:
        urldata = utils.getHtml(
            "https://www.porndig.com/posts/load_more_posts",
            pdreferer,
            headers,
            data=data)
    except:
        return None
    utils.kodilog(pdreferer)
    utils.kodilog(headers)
    utils.kodilog(data)
    utils.kodilog(urldata)
    urldata = ParseJson(urldata)
    i = 0
    match = re.compile(
        r'<a.*?href="([^"]+)" title="([^"]+)">(.+?)img\s+data-src="(.+?)".+?<span class="pull-left">(.+?)<',
        re.DOTALL | re.IGNORECASE).findall(urldata)
    for url, name, hd, img, duration in match:
        if hd.find('qlt_full_hd') > 0:
            hd = " [COLOR yellow]FullHD[/COLOR] "
        elif hd.find('qlt_hd') > 0:
            hd = " [COLOR orange]HD[/COLOR] "
        elif hd.find('4k') > 0:
            hd = " [COLOR red]4K[/COLOR] "
        else:
            hd = " "
        url = "https://www.porndig.com" + url
        name = name + hd + "[COLOR deeppink]" + duration + "[/COLOR]"
        name = name.encode("utf8")
        utils.addDownLink(name, url, 292, img, '')
        i += 1
    page += 1
    name = 'Page ' + str(page + 1)
    utils.addDir(name, '', 291, page=page, channel=channel, section=section)
    xbmcplugin.endOfDirectory(utils.addon_handle)
Esempio n. 29
0
def v7_play(url, name, download=None):
    utils.kodilog(url)
    vp = utils.VideoPlayer(name, download=download, regex='''src\s*=\s*["']([^'"]+)''')
    vp.play_from_site_link(url)
Esempio n. 30
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
Esempio n. 31
0
def process_custom_site_zip(path):
    import json

    if int(basics.kodiver) == 18:
        from resources.lib import zfile as zipfile
    else:
        import zipfile

    def move(src, target):
        frm = os.path.join(basics.tempDir, src)
        to = os.path.join(basics.customSitesDir, target)
        os.rename(frm, to)

    basics.clean_temp()
    zip = zipfile.ZipFile(path, 'r')
    try:
        with zip.open('meta.json') as metafile:
            meta_data = json.load(metafile)
    except:
        zip.close()
        utils.kodilog('Invalid file')
        return False
    name = meta_data['name']
    original_module = meta_data['module_name']
    author = meta_data['author']
    version = meta_data['version']
    title = meta_data['title']
    url = meta_data['url']
    original_image = meta_data.get('image')
    original_about = meta_data.get('about')
    if original_about and not original_about.endswith('.txt'):
        zip.close()
        utils.kodilog('About file must have .txt extension')
        return False
    if original_module and not original_module.endswith('.py'):
        zip.close()
        utils.kodilog('Module file must have .py extension')
        return False
    checkable = (author, name)
    checkable_file_names = (original_module, original_about, original_image)
    invalid_chars = ['\\', '/', ':', '<', '>', '|', '"', '?', '*']
    for c in checkable_file_names:
        if not c:
            continue
        for i in invalid_chars:
            if i in c:
                zip.close()
                utils.kodilog('Invalid character ({}) in value of meta data: {}'.format(i, c))
                return False
    invalid_chars.append('.')
    for c in checkable:
        if not c:
            continue
        for i in invalid_chars:
            if i in c:
                zip.close()
                utils.kodilog('Invalid character ({}) in value of meta data: {}'.format(i, c))
                return False
    extractable = (original_module, original_image, original_about)
    extracted = []
    for e in extractable:
        if e:
            if e not in zip.namelist():
                zip.close()
                utils.kodilog('File not found in archive: {}'.format(e))
                basics.clean_temp()
                return False
            zipfile.ZipFile.extract(zip, e, basics.tempDir)
            extracted.append(e)
    zip.close()
    if len(extracted) == 0:
        basics.clean_temp()
        return False
    already_installed = select_custom_sites_attributes((author, name), 'title', 'version')
    if already_installed:
        old_title = already_installed[0][0]
        old_version = already_installed[0][1]
        utils.textBox('Site already installed', 'Custom site is already installed[CR]Title: {}[CR]Version: {}[CR][CR]'
                                                'New title: {}[CR]New version: {}[CR]'.format(old_title, old_version,
                                                                                              title, version))
        if not utils.dialog.yesno('Site already installed', 'Replace version {} with {}?'.format(old_version, version)):
            basics.clean_temp()
            return False
        keep_favorites = utils.dialog.yesno('Site already installed',
                                            'Old favorites and custom list items'
                                            ' could be incompatible with the new version. Keep them?')
        delete_custom_site(author, name, keep_favorites)
    id = get_new_site_id()
    new_module = "custom_{}.py".format(id)
    new_image = "{}_{}_img.{}".format(author, name, original_image.split('.')[-1]) if original_image else None
    new_about = "{}_{}_about.txt".format(author, name) if original_about else None
    add_custom_site(author, name, title, url, new_image, new_about.split('.')[0] if new_about else None,
                    version, new_module.split('.')[0])
    move(original_module, new_module)
    if original_image:
        move(original_image, new_image)
    if original_about:
        move(original_about, new_about)
    basics.clean_temp()
    return True