コード例 #1
0
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh', 'It looks like this website is down.')
        return None
    match = re.compile(
        'thumb-main-titre"><a href="..([^"]+)".*?title="([^"]+)".*?src="([^"]+)".*?<div class="thumb-info">(.*?)time">([^<]+)<',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videourl, name, img, hd, duration in match:
        name = utils.cleantext(name)
        if hd.find('hd') > 0:
            if hd.find('full') > 0:
                hd = " [COLOR yellow]FULLHD[/COLOR] "
            else:
                hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        videopage = "http://www.absoluporn.com" + videourl
        videopage = videopage.replace(" ", "%20")
        name = name + hd + "[COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, videopage, 302, img, '')
    try:
        nextp = re.compile(
            r'<span class="text16">\d+</span> <a href="..([^"]+)"').findall(
                listhtml)[0]
        nextp = nextp.replace(" ", "%20")
        utils.addDir('Next Page', 'http://www.absoluporn.com' + nextp, 301, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #2
0
def PTCheck_tags(url):
    try:
        listhtml = utils.getHtml(url)
    except:
        return None
    tags = {}
    matches = re.compile('<a href="([^"]+tags[^"]+)">([^<]+)</a>',
                         re.DOTALL | re.IGNORECASE).findall(listhtml)
    if matches:
        for url, tag in matches:
            tag = tag.strip()
            tags[tag] = url
        selected_tag = utils.selector('Pick a tag to look up videos',
                                      tags,
                                      show_on_one=True)
        if not selected_tag:
            return

        tagurl = selected_tag + '?mode=async&function=get_block&block_id=list_videos_common_videos_list_norm&sort_by=post_date&from4=1'
        contexturl = (utils.addon_sys + "?mode=" + str('porntrex.PTList') +
                      "&url=" + urllib_parse.quote_plus(tagurl))
        xbmc.executebuiltin('Container.Update(' + contexturl + ')')
    else:
        utils.notify('Notify', 'No tags found at this video')
        return
コード例 #3
0
def PAQList(url, page=1, onelist=None):
    if onelist:
        url = url.replace('page/1/', 'page/' + str(page) + '/')
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh', 'It looks like this website is down.')
        return None
    if 'pornaq' in url:
        match = re.compile(
            r'<h2>\s+<a title="([^"]+)" href="([^"]+)".*?src="([^"]+)" class="attachment-primary-post-thumbnail',
            re.DOTALL | re.IGNORECASE).findall(listhtml)
        for name, videopage, img in match:
            name = utils.cleantext(name)
            utils.addDownLink(name, videopage, 62, img, '')
    elif 'porn00' in url:
        match = re.compile(
            '<h2> <a title="([^"]+)" href="([^"]+)".*?src="([^"]+)" class="attachment-primary-post-thumbnail',
            re.DOTALL | re.IGNORECASE).findall(listhtml)
        for name, videopage, img in match:
            name = utils.cleantext(name)
            utils.addDownLink(name, videopage, 62, img, '')
    if not onelist:
        if re.search("<span class='current'>\d+?</span><span>", listhtml,
                     re.DOTALL | re.IGNORECASE):
            npage = page + 1
            url = url.replace('page/' + str(page) + '/',
                              'page/' + str(npage) + '/')
            utils.addDir('Next Page (' + str(npage) + ')', url, 61, '', npage)
        xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #4
0
def Playvid(url, name):
    playmode = int(utils.addon.getSetting('chatplay'))
    camhtml = utils._getHtml(url, headers=IOS_UA)

    if playmode == 0:
        m3u8stream = re.search(r"hlsUrl:\s*'([^']+)", camhtml)
        if m3u8stream:
            videourl = '{0}|User-Agent={1}'.format(m3u8stream.group(1),
                                                   IOS_UA['User-Agent'])
        else:
            utils.notify('Oh oh', 'Couldn\'t find a playable webcam link')
            return

    elif playmode == 1:
        data = re.search(r"flashData:\s*(.*?}),", camhtml)
        if data:
            data = json.loads(data.group(1))
            swfurl = data.get('playerUrl')
            data = data.get('flashVars')
            streamserver = data.get('videoAppUrl')
            modelname = data.get('videoPlayUrl')
            videourl = "{0} swfUrl={1} pageUrl={2} conn=S:null conn=S: conn=S:{3} playpath={3}".format(
                streamserver, swfurl, url, modelname)
        else:
            utils.notify('Oh oh', 'Couldn\'t find a playable webcam link')
            return

    vp = utils.VideoPlayer(name)
    vp.play_from_direct_link(videourl)
コード例 #5
0
def Playvid(url, name, download=None):
    vp = utils.VideoPlayer(name, download)
    vp.progress.update(25, "[CR]Loading video page[CR]")
    videopage = utils.getHtml(url, '')
    if 'class="ipe-vplayer"' in videopage:
        videolink = re.compile(r'ipe-vplayer".+?data-url="([^"]+)', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
        vp.play_from_site_link(videolink)
    elif 'source src=' in videopage:
        videolink = re.compile(r'source\s*src="([^"]+)', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
        vp.play_from_direct_link(videolink)
    elif 'type="video/mp4"' in videopage:
        videolink = re.compile(r'type="video/mp4"\s*src="([^"]+)', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
        vp.play_from_direct_link(videolink)
    elif 'class="wps-player"' in videopage:
        videodiv = re.compile(r'wps-player"(.+?)</div', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
        videolink = re.compile(r'<iframe\s*src="([^"]+)', re.DOTALL | re.IGNORECASE).findall(videodiv)[0]
        vp.play_from_link_to_resolve(videolink)
    elif 'class="video-player"' in videopage:
        videodiv = re.compile(r'video-player"(.+?)</div', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
        if 'itemprop="contentURL"' in videodiv:
            videolink = re.compile(r'itemprop="contentURL"\s*content="([^"]+)', re.DOTALL | re.IGNORECASE).findall(videodiv)[0]
            vp.play_from_direct_link(videolink)
        else:
            videolink = re.compile(r'<iframe\s*src="([^"]+)', re.DOTALL | re.IGNORECASE).findall(videodiv)[0]
            vp.play_from_link_to_resolve(videolink)
    else:
        utils.notify('Oh oh', 'Couldn\'t find a playable link')
        return None
コード例 #6
0
def Favorites(fav, favmode, name, url, img):
    if fav == "add":
        existing_favorite = select_favorite(url)
        if existing_favorite:
            if existing_favorite[0] == name and existing_favorite[3] == img and existing_favorite[2] == favmode:
                utils.notify('Favorite already exists', 'Video already in favorites')
            else:
                if existing_favorite[2] != favmode:
                    question = 'it'
                if existing_favorite[0] != name:
                    question = 'its name'
                if existing_favorite[3] != img:
                    question = 'its picture'
                if existing_favorite[0] != name and existing_favorite[3] != img:
                    question = 'its name and picture'
                if utils.dialog.yesno('Video already in favorites','This video is already in the favorites with the title', existing_favorite[0], 'Update {}?'.format(question)):
                    update_favorite(favmode, name, url, img)
                    utils.notify('Favorite updated', 'Video updated')
        else:
            addFav(favmode, name, url, img)
            utils.notify('Favorite added', 'Video added to the favorites')
    elif fav == "del":
        delFav(url)
        utils.notify('Favorite deleted', 'Video removed from the list')
        xbmc.executebuiltin('Container.Refresh')
    elif fav == "move_to_end":
        move_fav_to_end(url)
        utils.notify('Favorite moved', 'Video moved to end of the list')
        xbmc.executebuiltin('Container.Refresh')
コード例 #7
0
def Playvid(url, name, download=0):
    global MFC_SERVERS
    MFC_SERVERS = {}

    serverlist = utils.getHtml2('https://new.myfreecams.com/server')
    jsonlist = simplejson.loads(serverlist)

    MFC_SERVERS['WZOBSSERVERS'] = jsonlist["wzobs_servers"]
    MFC_SERVERS['H5SERVERS'] = jsonlist["h5video_servers"]
    MFC_SERVERS['NGSERVERS'] = jsonlist["ngvideo_servers"]
    MFC_SERVERS['CHATSERVERS'] = jsonlist["chat_servers"]

    videourl = myfreecam_start(url)

    if videourl:
        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)
        if utils.addon.getSetting("dwnld_stream") == "true" or download == 1:
            utils.dwnld_stream(videourl, name)
    else:
        utils.notify('Oh oh', 'Couldn\'t find a playable webcam link')
コード例 #8
0
    def alarmStateHealthCheck(self):
        """ Function to determine state of alarms on cameras, and also connectivity health of camera """

        # Non-alarm enabled or Generic IP Cameras return this
        if not self.motion_enabled and not self.sound_enabled:
            return False
        
        alarmActive = False  
        success_code, alarmActive, alarm = self.camera.is_alarm_active(self.motion_enabled, self.sound_enabled)

        ### Health Check code for Foscam Camera ###
        if success_code != 0:       

            #Timeout is ~20 seconds before determining camera is not connected  
            for x in range(1,2):
                
                utils.log(2, 'Camera %s :: SERVICE HEALTH CHECK :: Did not receive response 0, received response %d.  Retry # %d in 5 seconds' %(self.camera.number, success_code, x))
                self.monitor.waitForAbort(5)
                success_code, alarmActive, alarm = self.camera.is_alarm_active(self.motion_enabled, self.sound_enabled)      

                if success_code == 0:  
                    break

            #Camera is not connected, so notify the user
            if success_code != 0:

                self.monitor.closeRequest(self.camera.number)
                utils.notify(utils.translation(32222) %self.camera.number)   
                self.monitor.write_testResult(self.camera.number, success_code)

                #Loop to keep retrying the connection ever 60 seconds
                x = 0
                while success_code != 0:
                    if self.monitor.abortRequested() or self.monitor.stopped():
                        return False
                    
                    if x > 60:
                        x = 0
                        utils.log(3, 'Camera %s :: SERVICE HEALTH CHECK  :: Did not receive response 0, received response %d.  Retrying every 60 seconds.' %(self.camera.number, success_code))
                        success_code, alarmActive, alarm = self.camera.is_alarm_active(self.motion_enabled, self.sound_enabled)
                    
                    self.monitor.waitForAbort(1)
                    x += 1

                utils.notify(utils.translation(32223) %self.camera.number)
                self.monitor.write_testResult(self.camera.number, success_code)
                
                #Reset PTZ Camera on Service Start
                self.camera.resetLocation()
                    
            ### End of Health Check code for Foscam HD camera ###


        if alarmActive:
            self.monitor.set_alarmActive(self.camera.number)
            utils.log(2, 'Camera %s :: Alarm detected: (%sed).' %(self.camera.number, alarm))
            return True
    
        self.monitor.clear_alarmActive(self.camera.number)   
        return False
コード例 #9
0
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh', 'It looks like this website is down.')
        return None
    match = re.compile(
        '<a href="([^"]+)"[^<]+<img src="([^"]+)" alt="([^"]+)"[^<]+[^>]+>([^<]+)</span>(.*?)<strong',
        re.DOTALL).findall(listhtml)
    for videopage, img, name, dur, hd in match:
        if 'hd' in hd:
            hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        name = utils.cleantext(name)
        name = name + hd + "[COLOR deeppink]" + dur + "[/COLOR]"
        videopage = 'http://www.hclips.com/embed/' + videopage.split(':')[-2]
        utils.addDownLink(name, videopage, 382, img, '')
    try:
        nextp = re.compile('<li class="next">.+?<a href="([^"]+)".*?>Next</a>',
                           re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', 'http://www.hclips.com' + nextp[0], 381, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #10
0
def enable_custom_site():
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("SELECT author, name, title FROM custom_sites WHERE enabled = 0")
    rows = c.fetchall()
    conn.close()
    if not rows:
        utils.notify('No disabled custom sites found')
        return
    if not utils.dialog.yesno('WARNING',
                              'Custom sites are not verified by Cumination, and could contain malware.[CR]'
                              'Only enable sites from trusted sources. Proceed?'):
        return
    sites = {'{} by {}'.format(title, author): [author, name, title] for author, name, title in rows}
    chosen = utils.selector("Select site to enable", sites, show_on_one=True)
    author, name, title = chosen
    if not utils.dialog.yesno('WARNING',
                              'Custom sites are not verified by Cumination, and could contain malware.[CR]'
                              '{} will be enabled.[CR]Continue?'.format(title)):
        return
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("UPDATE custom_sites SET enabled = 1 WHERE author = ? and name = ?", (author, name))
    conn.commit()
    conn.close()
    xbmc.executebuiltin('Container.Refresh')
    utils.notify("{}".format(title), "Site enabled")
コード例 #11
0
ファイル: beeg.py プロジェクト: anton40/WhiteCream-V0.0.1
def BGList(url):
    bgversion = addon.getSetting('bgversion')
    try:
        listjson = utils.getHtml(url,'')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None

    match = re.compile(r'\{"title":"([^"]+)","id":"([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listjson)

    for title, videoid in match:
        img = "http://img.beeg.com/236x177/" + videoid +  ".jpg"
        videopage = "https://api.beeg.com/api/v6/"+bgversion+"/video/" + videoid
        name = title.encode("utf8")
        utils.addDownLink(name, videopage, 82, img, '')
    try:
        page=re.compile('http://api2.beeg.com/api/v6/'+bgversion+'/index/[^/]+/([0-9]+)/pc', re.DOTALL | re.IGNORECASE).findall(url)[0]
        page = int(page)
        npage = page + 1
        jsonpage = re.compile(r'pages":(\d+)', re.DOTALL | re.IGNORECASE).findall(listjson)[0]
        if int(jsonpage) > page:
            nextp = url.replace("/"+str(page)+"/", "/"+str(npage)+"/")
            utils.addDir('Next Page ('+str(npage)+')', nextp,81,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #12
0
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('thumb-main-titre"><a href="..([^"]+)".*?title="([^"]+)".*?src="([^"]+)".*?<div class="thumb-info">(.*?)time">([^<]+)<', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videourl, name, img, hd, duration in match:
        name = utils.cleantext(name)
        if hd.find('hd') > 0:
            if hd.find('full') > 0:
                hd = " [COLOR yellow]FULLHD[/COLOR] "
            else:
                hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        videopage = "http://www.absoluporn.com" + videourl
        videopage = videopage.replace(" ","%20")
        name = name + hd + "[COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, videopage, 302, img, '')
    try:
        nextp=re.compile(r'<span class="text16">\d+</span> <a href="..([^"]+)"').findall(listhtml)[0]
        nextp = nextp.replace(" ","%20")
        utils.addDir('Next Page', 'http://www.absoluporn.com' + nextp, 301,'')
    except: pass    
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #13
0
def enable_all_custom_sites():
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("SELECT author, name, title FROM custom_sites WHERE enabled = 0")
    rows = c.fetchall()
    conn.close()
    if not rows:
        utils.notify('No disabled custom sites found')
        return
    if not utils.dialog.yesno('WARNING',
                              'Custom sites are not verified by Cumination, and could contain malware.[CR]'
                              'Only enable sites from trusted sources. Proceed?'):
        return
    text = ''
    for author, _, title in rows:
        text += '{} by {}[CR]'.format(title, author)
    utils.textBox('Sites to enable', text.strip())
    if not utils.dialog.yesno('WARNING',
                              'Custom sites are not verified by Cumination, and could contain malware.[CR]'
                              'All custom sites will be enabled.[CR]Continue?'):
        return
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("UPDATE custom_sites SET enabled = 1 WHERE enabled = 0")
    conn.commit()
    conn.close()
    xbmc.executebuiltin('Container.Refresh')
    utils.notify("All custom sites enabled")
コード例 #14
0
def disable_all_custom_sites():
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("SELECT author, name, title FROM custom_sites WHERE enabled = 1")
    rows = c.fetchall()
    conn.close()
    if not rows:
        utils.notify('No enabled custom sites found')
        return
    text = ''
    for author, _, title in rows:
        text += '{} by {}[CR]'.format(title, author)
    utils.textBox('Sites to disable', text.strip())
    if not utils.dialog.yesno('WARNING',
                              'All custom sites will be disabled.[CR]Continue?'):
        return
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("UPDATE custom_sites SET enabled = 0 WHERE enabled = 1")
    conn.commit()
    conn.close()
    xbmc.executebuiltin('Container.Refresh')
    utils.notify("All custom sites disabled")
コード例 #15
0
ファイル: hentaihaven.py プロジェクト: troywillett/xxxbones
def Playvid(url, name, download=None):
    UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0'
    videopage = utils.getHtml(url)
    sources = re.findall(
        '''<source\s*.+?label=['"](\w+)['"]\s*src=['"]([^'"]+)''', videopage)
    sources = [(i[0], i[1]) for i in sources if not i[1] == "dead_link"]

    if "<source" in videopage:
        videourl = re.compile('<source.*?src="([^"]+)"',
                              re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    else:
        videourl = re.compile(
            'class="btn btn-1 btn-1e" href="([^"]+)" target="_blank"',
            re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    if videourl:
        videourl += '|User-Agent=' + urllib.quote(UA) + '&Referer=' + url
        if 'play.php' in videourl:
            videourl = utils.getVideoLink(videourl, url)
        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)

    else:
        utils.notify('Oh oh', 'Couldn\'t find a video')
コード例 #16
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()
コード例 #17
0
def Playvid(url, name):
    vp = utils.VideoPlayer(name)
    vp.progress.update(25, "[CR]Loading video page[CR]")
    try:
        postRequest = {'method': 'getRoomData', 'args[]': str(url)}
        response = utils._postHtml(
            '{0}/tools/amf.php'.format(site.url),
            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_' + url + '.m3u8'
    else:
        videourl = 'https:' + amf_json['localData'][
            'videoServerUrl'] + '/hls/stream_' + url + '/playlist.m3u8'

    videourl += '|User-Agent={0}'.format(utils.USER_AGENT)
    vp.progress.update(75, "[CR]Found Stream[CR]")
    vp = utils.VideoPlayer(name)
    vp.play_from_direct_link(videourl)
コード例 #18
0
def Get_Filters():
    filteroption_duration = {0: None, 1: 'ten-thirty-min/', 2: 'ten-min/', 3: 'thirty-all-min/'}
    durationvalue = int(utils.addon.getSetting("filterduration"))
    if durationvalue not in filteroption_duration:
        durationvalue = 0
        utils.notify('FilterError', 'Selected Duration Filter not available. Using Site Default.')
    return filteroption_duration[durationvalue]
コード例 #19
0
def PTCheck_pornstars(url):
    try:
        listhtml = utils.getHtml(url)
    except:
        return None
    pornstars = {}
    matches = re.compile(
        '<a href="([^"]+models[^"]+)"><i class="fa fa-star"></i>([^<]+)</a>',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    if matches:
        for url, model in matches:
            model = model.strip()
            pornstars[model] = url
        selected_model = utils.selector('Choose model to add',
                                        pornstars,
                                        sort_by=lambda x: x[1],
                                        show_on_one=True)
        if not selected_model:
            return

        try:
            modelhtml = utils.getHtml(selected_model)
        except:
            return None
        id = re.findall(r'(?si)data-subscribe-to="model" data-id="(\d+)"',
                        modelhtml)[0]
        if id:
            success = PTSubscribe_pornstar(selected_model, id)
            if success:
                utils.notify(
                    'Success',
                    'Pornstar added successfull to your subscriptions')
    else:
        utils.notify('Notify', 'No tagged pornstars found in this video')
    return
コード例 #20
0
def List():
    if utils.addon.getSetting("chaturbate") == "true":
        for f in AdultSite.clean_functions:
            f(False)
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    try:
        if basics.addon.getSetting('custom_sites') == 'true':
            c.execute(
                "SELECT f.* FROM (SELECT * FROM favorites ORDER BY ROWID DESC) f LEFT JOIN custom_sites cs on 'custom_' || cs.name || '_by_' || cs.author = substr(f.mode, 1, instr(f.mode, '.') - 1) WHERE IFNULL(cs.enabled, 1) = 1"
            )
        else:
            c.execute(
                "SELECT f.* FROM (SELECT * FROM favorites ORDER BY ROWID DESC) f LEFT JOIN custom_sites cs on 'custom_' || cs.name || '_by_' || cs.author = substr(f.mode, 1, instr(f.mode, '.') - 1) WHERE cs.name IS NULL"
            )
        for (name, url, mode, img, duration, quality) in c.fetchall():
            duration = '' if duration is None else duration
            quality = '' if quality is None else quality
            basics.addDownLink(name,
                               url,
                               mode,
                               img,
                               desc='',
                               stream='',
                               fav='del',
                               duration=duration,
                               quality=quality)
        conn.close()
        utils.eod(utils.addon_handle)
    except:
        conn.close()
        utils.notify('No Favorites', 'No Favorites found')
        return
コード例 #21
0
def Favorites(fav, favmode, name, url, img):
    if fav == "add":
        existing_favorite = select_favorite(url)
        if existing_favorite:
            if existing_favorite[0] == name and existing_favorite[
                    3] == img and existing_favorite[2] == favmode:
                utils.notify('Favorite already exists',
                             'Video already in favorites')
            else:
                if existing_favorite[2] != favmode:
                    question = 'it'
                if existing_favorite[0] != name:
                    question = 'its name'
                if existing_favorite[3] != img:
                    question = 'its picture'
                if existing_favorite[0] != name and existing_favorite[3] != img:
                    question = 'its name and picture'
                if utils.dialog.yesno(
                        'Video already in favorites',
                        'This video is already in the favorites with the title',
                        existing_favorite[0], 'Update {}?'.format(question)):
                    update_favorite(favmode, name, url, img)
                    utils.notify('Favorite updated', 'Video updated')
        else:
            addFav(favmode, name, url, img)
            utils.notify('Favorite added', 'Video added to the favorites')
    elif fav == "del":
        delFav(url)
        utils.notify('Favorite deleted', 'Video removed from the list')
        xbmc.executebuiltin('Container.Refresh')
    elif fav == "move_to_end":
        move_fav_to_end(url)
        utils.notify('Favorite moved', 'Video moved to end of the list')
        xbmc.executebuiltin('Container.Refresh')
コード例 #22
0
def NLVIDEOLIST(url, page=1):
    siteurl = sitelist[page]
    try:
        link = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh', 'It looks like this website is down.')
        return None
    match = re.compile(
        r'<article([^>]*)>.*?href="([^"]+)".*?src="([^"]+)".*?<h3>([^<]+)<.*?duration">[^\d]+([^\s<]+)(?:\s|<)',
        re.DOTALL | re.IGNORECASE).findall(link)
    for hd, url, img, name, duration in match:
        if len(hd) > 2:
            hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        videourl = siteurl + url
        duration2 = "[COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name + hd + duration2, videourl, 102, img, '')
    try:
        nextp = re.compile('<a href="([^"]+)" title="volg',
                           re.DOTALL | re.IGNORECASE).findall(link)
        nextp = siteurl + nextp[0]
        utils.addDir('Next Page', nextp, 101, '', page)
    except:
        pass
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
コード例 #23
0
def Playvid(url, name, download=None):
    videopage = utils.getHtml(url)
    videourl = re.compile('class="btn btn-1 btn-1e" href="([^"]+)" target="_blank"', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    if videourl:
        utils.playvid(videourl, name, download)
    else:
        utils.notify('Oh oh','Couldn\'t find a video')
コード例 #24
0
ファイル: naked.py プロジェクト: tetzy/repository.dobbelina
def Playvid(url, name):
	listhtml = utils.getHtml(url, '')
	namex=name.replace(' ','-').lower()
	try:
                seo_nameurl=url.split('=')[1]
	        model_list = re.compile('live clearfix model-wrapper.*?data-model-id=(.*?)data-model-name=(.*?)data-model-seo-name=(.*?)data.*?data-video-host=(.*?)data.*?data-live-image-src=(.*?)data.*?End Live', re.DOTALL | re.IGNORECASE).findall(listhtml)
                print (model_list)
	        for model_id, model, seo_name, videohost, img in model_list:
			if seo_nameurl in seo_name:
	        		videourl = 'https://manifest.vscdns.com/chunklist.m3u8?model_id=' + cleanname(model_id) + '&host=' + cleanname(videohost) + '&provider=highwinds&secure=true'

		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)
                        listitem.setProperty('inputstreamaddon','inputstream.adaptive')
                        listitem.setProperty('inputstream.adaptive.manifest_type', 'hls')
			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(match, listitem)
	except:
		utils.notify('Oh oh','Couldn\'t find a playable webcam link')
コード例 #25
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)
コード例 #26
0
def BGList(url):
    bgversion = addon.getSetting('bgversion')
    try:
        listjson = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh', 'It looks like this website is down.')
        return None

    match = re.compile(r'\{"title":"([^"]+)","id":"([^"]+)"',
                       re.DOTALL | re.IGNORECASE).findall(listjson)

    for title, videoid in match:
        img = "http://img.beeg.com/236x177/" + videoid + ".jpg"
        videopage = "https://api.beeg.com/api/v6/" + bgversion + "/video/" + videoid
        name = title.encode("utf8")
        utils.addDownLink(name, videopage, 82, img, '')
    try:
        page = re.compile(
            'http://api2.beeg.com/api/v6/' + bgversion +
            '/index/[^/]+/([0-9]+)/pc',
            re.DOTALL | re.IGNORECASE).findall(url)[0]
        page = int(page)
        npage = page + 1
        jsonpage = re.compile(r'pages":(\d+)',
                              re.DOTALL | re.IGNORECASE).findall(listjson)[0]
        if int(jsonpage) > page:
            nextp = url.replace("/" + str(page) + "/", "/" + str(npage) + "/")
            utils.addDir('Next Page (' + str(npage) + ')', nextp, 81, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #27
0
def PTCheck_pornstars(url):
    try:
        listhtml = utils.getHtml(url)
    except:
        return None
    pornstars = {}
    matches = re.compile(
        '<a href="([^"]+models[^"]+)"><i class="fa fa-star"></i>([^<]+)</a>',
        re.DOTALL | re.IGNORECASE).findall(listhtml)
    if matches:
        for url, model in matches:
            model = model.strip()
            pornstars[model] = url
        selected_model = utils.selector('Choose model to view',
                                        pornstars,
                                        sort_by=lambda x: x[1],
                                        show_on_one=True)
        if not selected_model:
            return

        modelurl = selected_model + '?mode=async&function=get_block&block_id=list_videos_common_videos_list_norm&sort_by=post_date&from4=1'
        contexturl = (utils.addon_sys + "?mode=" + str('porntrex.PTList') +
                      "&url=" + urllib_parse.quote_plus(modelurl))
        xbmc.executebuiltin('Container.Update(' + contexturl + ')')

    else:
        utils.notify('Notify', 'No tagged pornstars found in this video')
    return
コード例 #28
0
ファイル: porntrex.py プロジェクト: anton40/WhiteCream-V0.0.1
def PTList(url, page=1, onelist=None):
    if onelist:
        url = url.replace('page=1','page='+str(page))
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile(r'<div class="(?:visible-xs|thumb-overlay)+">\s+<img src=.*?data-original="([^"]+)" title="([^"]+)"[^>]+>(.*?)duration">[^\d]+([^\t\n\r]+)', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for img, name, hd, duration in match:
        name = utils.cleantext(name)
        if hd.find('HD') > 0:
            hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        urlid = re.search(r"(\d{2,})", img, re.DOTALL | re.IGNORECASE).group()
        videopage = "http://www.porntrex.com/media/nuevo/config.php?key=" + urlid + "-1-1"
        name = name + hd + "[COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, videopage, 52, img, '')
    if not onelist:
        if re.search('class="prevnext">Next', listhtml, re.DOTALL | re.IGNORECASE):
            npage = page + 1        
            url = url.replace('page='+str(page),'page='+str(npage))
            utils.addDir('Next Page ('+str(npage)+')', url, 51, '', npage)
        xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #29
0
    def onClick(self, controlId):
        if controlId == 5001:
            self.close()

        elif controlId == 5002:
            logo = self.list_items[self.getControl(50).getSelectedPosition()]
            if not logo is None:
                database, cursor = connectEpgDB()
                epgDb = EpgDb(database, cursor)

                name = str(uuid4()) + logo[logo.rfind(r"."):]
                dest = join(settings.getChannelsLogoPath(), name)
                try:
                    copy(logo, dest)
                    epgDb.updateChannel(self.id_channel, logo=name)
                except:
                    if settings.DEBUG:
                        notify(EDIT_LOGO_ERROR)
                    del database
                    del cursor
                    epgDb.close()
                    del epgDb
                    return

                self.refresh = True
                self.close()
コード例 #30
0
def List(url):
    print "pornhub::List " + url
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh', 'It looks like this website is down.')
        return None
    match = re.compile(
        '<li class="videoblock.+?<a href="([^"]+)" title="([^"]+)".+?<var class="duration">([^<]+)</var>(.*?)</div.*?data-mediumthumb="([^"]+)"',
        re.DOTALL).findall(listhtml)
    for videopage, name, duration, hd, img in match:
        if hd.find('HD') > 0:
            hd = " [COLOR orange]HD[/COLOR] "
        else:
            hd = " "
        name = utils.cleantext(name)
        name = name + hd + "[COLOR deeppink]" + duration + "[/COLOR]"
        utils.addDownLink(name, 'http://www.pornhub.com' + videopage, 392, img,
                          '')
    try:
        nextp = re.compile(
            '<li class="page_next"><a href="(.+?)" class="orangeButton">Next</a></li>',
            re.DOTALL).findall(listhtml)
        utils.addDir('Next Page',
                     'http://www.pornhub.com' + nextp[0].replace('&amp;', '&'),
                     391, '')
    except:
        pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #31
0
def List(url):
    html = utils.getHtml(url)
    if '>Nichts gefunden!<' in html:
        utils.notify(msg='Nothing found')
        utils.eod()
        return

    delimiter = 'article id="post'
    re_videopage = 'href="([^"]+)" title'
    re_name = 'title="([^"]+)"'
    re_img = 'src="([^"]+)"'
    utils.videos_list(site,
                      'pornkinox.Playvid',
                      html,
                      delimiter,
                      re_videopage,
                      re_name,
                      re_img,
                      contextm='pornkinox.Related')

    re_npurl = r'class="next page-numbers" href="([^"]+)"'
    re_npnr = r'class="next page-numbers" href="[^"]+?/page/(\d+)'
    re_lpnr = r'>(\d+)<[^=]+class="next page-numbers"'
    utils.next_page(site,
                    'pornkinox.List',
                    html,
                    re_npurl,
                    re_npnr,
                    re_lpnr=re_lpnr,
                    contextm='pornkinox.GotoPage')
    utils.eod()
コード例 #32
0
def disable_custom_site():
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute("SELECT author, name, title FROM custom_sites WHERE enabled = 1")
    rows = c.fetchall()
    conn.close()
    if not rows:
        utils.notify('No enabled custom sites found')
        return
    sites = {
        '{} by {}'.format(title, author): [author, name, title]
        for author, name, title in rows
    }
    chosen = utils.selector("Select site to enable", sites, show_on_one=True)
    author, name, title = chosen
    conn = sqlite3.connect(favoritesdb)
    conn.text_factory = str
    c = conn.cursor()
    c.execute(
        "UPDATE custom_sites SET enabled = 0 WHERE author = ? and name = ?",
        (author, name))
    conn.commit()
    conn.close()
    xbmc.executebuiltin('Container.Refresh')
    utils.notify("{}".format(title), "Site disabled")
コード例 #33
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)
コード例 #34
0
def List(url):
    try:
        response = utils.getHtml(url, '', cookie)
    except:
        utils.notify('Oh oh', 'It looks like this website is down.')
        return None
    match = re.compile(
        r'<a href="([^"]+)[^>]+hRotator[^\']+\'([^\']+)[^"]+"([^"]+)[^<]+[^>]+><b>([0-9:]+)<',
        re.DOTALL | re.IGNORECASE).findall(response)
    for video, img, name, runtime in match:
        name = runtime + " - " + utils.cleantext(name)
        utils.addDownLink(name, video, 507, img, '')
    currentpage = re.compile("class='pager'.*<span>([0-9]+)</span><a",
                             re.DOTALL | re.IGNORECASE).findall(response)
    if currentpage:
        npage = int(currentpage[0]) + 1
        if ".html" in url:
            next = url.replace('-' + str(currentpage[0]) + '.html',
                               '-' + str(npage) + '.html')  ##normal page
        else:
            if "page=" not in url:
                url = url + "&page=" + str(currentpage[0])
            next = url.replace('page=' + str(currentpage[0]),
                               'page=' + str(npage))  ##search page
        utils.addDir('Next Page (' + str(npage) + ')', next, 506, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #35
0
def Playvid(url, name, download=None):
    url = url.replace("_", "&id=")
    response = utils.getHtml('http://daxab.com/player/?oid=' + url + '&color=f12b24', 'https://daxab.com/')

    token = re.compile('access_token: "([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    videos = re.compile('id: "([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    extra_key = re.compile('sig: "([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    ckey = re.compile('c_key: "([^"]+)",', re.DOTALL | re.IGNORECASE).findall(response)

    response = utils.getHtml ("https://crazycloud.ru/method/video.get?callback=jQuery31108732364196646363_1490030654100&token=" + token[0] + "&videos=" + videos[0] + "&extra_key=" + extra_key[0] + "&ckey=" + ckey[0] + "&_=1490030654101", "https://daxab.com/")

    match_240 = re.compile('"mp4_240":"([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    match_360 = re.compile('"mp4_360":"([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    match_480 = re.compile('"mp4_480":"([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    match_720 = re.compile('"mp4_720":"([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    match_1080 = re.compile('"mp4_1080":"([^"]+)', re.DOTALL | re.IGNORECASE).findall(response)
    if match_240: 
        videourl = match_240[0].replace("\\","")
    if match_360: 
        videourl = match_360[0].replace("\\","")
    if match_480: 
        videourl = match_480[0].replace("\\","")
    if match_720: 
        videourl = match_720[0].replace("\\","")
    if match_1080: 
        videourl = match_1080[0].replace("\\","")
        
    if videourl:
        utils.playvid(videourl, name, download)
    else:
        utils.notify('Oh oh','Couldn\'t find a video')
コード例 #36
0
 def createSubFolders(self):
     progress = DialogProgress()
     try:
         progress.create(SF_SUBFOLDERS_PROGRESS_HEADER, SF_SUBFOLDERS_PROGRESS_MSG)
         row = "id_channel" if getSFFoldersPattern() == AddonConst.SF_XMLTV_ID_PATTERN else 'display_name' 
         request = "SELECT %s FROM channels" % row
         
         if self.database is None or self.cursor is None:
             notify(SF_CHANNELS_INFOS_ERROR)
             progress.close()
             return
         
         self.cursor.execute(request)
         channels = self.cursor.fetchall()
         
         i = 1
         for channel in channels:
             
             if not isfile(join(getSFFolder(translate=True), channel[0])):
                 try:
                     mkdir(join(getSFFolder(translate=True), channel[0]))
                 except OSError:
                     pass
                 
             progress.update(int( ( i / float(len(channels)) ) * 100), "", 
                             SF_DIR_STRING + ' %i/%i' % (i, len(channels)))
             i += 1
             
     except SqliteError:
         progress.close()
         if DEBUG:
             notify(SF_CHANNELS_INFOS_ERROR)
     progress.close()   
コード例 #37
0
def Favorites(fav, favmode, name, url, img):
    if fav == "add":
        delFav(url)
        addFav(favmode, name, url, img)
        utils.notify("Favorite added", "Video added to the favorites")
    elif fav == "del":
        delFav(url)
        utils.notify("Favorite deleted", "Video removed from the list")
        xbmc.executebuiltin("Container.Refresh")
コード例 #38
0
ファイル: sexix.py プロジェクト: anton40/WhiteCream-V0.0.1
def Playvid(url, name, download=None):
    videopage = utils.getHtml(url)
    plurl = re.compile('\?u=([^"]+)"', re.DOTALL | re.IGNORECASE).findall(videopage)[0]
    plurl = "http://sexix.net/qaqqew/playlist.php?u=" + plurl
    plpage = utils.getHtml(plurl, url)
    videourl = re.compile('file="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(plpage)[0]
    if videourl:
        utils.playvid(videourl, name, download)
    else:
        utils.notify("Oh oh", "Couldn't find a video")
コード例 #39
0
def clear_fav():
    if not utils.dialog.yesno('Warning','This will delete all your favorites', 'Continue?', nolabel='No', yeslabel='Yes'):
        return
    conn = sqlite3.connect(favoritesdb)
    c = conn.cursor()
    c.execute("DELETE FROM favorites")
    conn.commit()
    conn.close()
    xbmc.executebuiltin('Container.Refresh')
    utils.notify("Favorites deleted", "")
コード例 #40
0
def HCList(url):
    utils.addDir('[COLOR hotpink]A-Z List[/COLOR] [COLOR white]Censored & Uncensored[/COLOR]','http://www.hentaicraving.com/hentai-list/',33,'','')
    try:
        link = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile("""<a href='([^']+)'><img.*?title="([^"]+)".*?src="([^"]+)".*?Description: </b> ([^<]+)<p>""", re.DOTALL | re.IGNORECASE).findall(link)
    for videourl, name, img, desc in match:
        addHCDir(name, videourl, 31, img, desc)
    xbmc.executebuiltin('Container.SetViewMode(503)')
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #41
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)
コード例 #42
0
def Playvid(url, name):
    playmode = int(addon.getSetting('chatplay'))
    chatslow = int(addon.getSetting('chatslow'))
    listhtml = utils.getHtml(url, hdr=cbheaders)
    iconimage = xbmc.getInfoImage("ListItem.Thumb")
    
    m3u8url = re.compile(r"jsplayer, '([^']+)", re.DOTALL | re.IGNORECASE).findall(listhtml)
    if m3u8url:
        m3u8stream = m3u8url[0]
        if chatslow == 1:
            m3u8stream = m3u8stream.replace('_fast','')
    else:
        m3u8stream = False
    
    if playmode == 0:
        if m3u8stream:
            videourl = m3u8stream
        else:
            utils.notify('Oh oh','Couldn\'t find a playable webcam link')
            return
        
    elif playmode == 1:
        if m3u8stream:
            from F4mProxy import f4mProxyHelper
            f4mp=f4mProxyHelper()
            f4mp.playF4mLink(m3u8stream,name,proxy=None,use_proxy_for_chunks=False, maxbitrate=0, simpleDownloader=False, auth=None, streamtype='HLS',setResolved=False,swf=None , callbackpath="",callbackparam="", iconImage=iconimage)
            return
        else:
            utils.notify('Oh oh','Couldn\'t find a playable webcam link')
            return        
    
    elif playmode == 2:
        flv_info = []
        embed = re.compile(r"EmbedViewerSwf\(*(.+?)\);", re.DOTALL).findall(listhtml)[0]
        for line in embed.split("\n"):
            data = re.search("""\s+["']([^"']+)["'],""", line)
            if data:
                flv_info.append(data.group(1))
        
        streamserver = "rtmp://%s/live-edge"%(flv_info[2])
        modelname = flv_info[1]
        username = flv_info[8]
        password = urllib.unquote(flv_info[12])
        unknown = flv_info[13]
        swfurl = "https://chaturbate.com/static/flash/CBV_2p650.swf"
        
        videourl = "%s app=live-edge swfUrl=%s tcUrl=%s pageUrl=http://chaturbate.com/%s/ conn=S:%s conn=S:%s conn=S:2.650 conn=S:%s conn=S:%s playpath=mp4"%(streamserver,swfurl,streamserver,modelname,username,modelname,password,unknown)

    listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
    listitem.setInfo('video', {'Title': name, 'Genre': 'P**n'})
    listitem.setProperty("IsPlayable","true")
    xbmc.Player().play(videourl, listitem)
コード例 #43
0
def new_build_check():
    log.log("Checking for a new build")
    
    check_official = addon.get_bool_setting('check_official')
    check_interval = addon.get_int_setting('check_interval')

    autoclose_ms = check_interval * 3540000 # check interval in ms - 1 min
    
    try:
        installed_build = builds.get_installed_build()
    except:
        log.log("Unable to get installed build so exiting")
        sys.exit(1)

    source = addon.get_setting('source_name')
    if (isinstance(installed_build, builds.Release) and source == "Official Releases"
        and not check_official):
        # Don't do the job of the official auto-update system.
        log.log("Skipping build check - official release")
    else:
        builds.arch = utils.get_arch()

        if addon.get_bool_setting('set_timeout'):
            builds.timeout = float(addon.get_setting('timeout'))

        build_sources = builds.sources()
        try:
            build_url = build_sources[source]
        except KeyError:
            log.log("{} is not a valid source".format(source))
            return

        log.log("Checking {}".format(build_url.url))

        latest = builds.latest_build(source)
        if latest and latest > installed_build:
            if utils.do_show_dialog():
                log.log("New build {} is available, "
                        "prompting to show build list".format(latest))

                if utils.yesno(
                        addon.name,
                        line1=L10n(32027).format(utils.format_build(latest)),
                        line2=L10n(32028).format(utils.format_build(installed_build)),
                        line3=L10n(32029),
                        autoclose=autoclose_ms):
                    with Main() as main:
                        main.start()
            else:
                utils.notify(L10n(32030).format(utils.format_build(latest)),
                             4000)
コード例 #44
0
ファイル: default.py プロジェクト: maikito26/script.foscam
    def onControl(self, control):
        if control == self.close_button:
            self.stop()
        elif control == self.settings_button:
            utils.open_settings()
        else:
            button = self.getControl(control)
            response = button.send_cmd(control)
            if not response:
                msg = u"{0}: {1}".format(utils.get_string(32103), response.message)
                utils.notify(msg)

                if isinstance(control, xbmcgui.ControlRadioButton):
                    control.setSelected(not control.isSelected())
コード例 #45
0
ファイル: naked.py プロジェクト: anton40/WhiteCream-V0.0.1
def List(url):
    if utils.addon.getSetting("chaturbate") == "true":
        clean_database(False)
    try:
        data = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    model_list = re.compile('int-each-hml">\s+<a class ="linkHandlerClass" title="([^"]+)" href="([^"]+)" target="">\s+<span[^<]+[^>]+>\s+<span[^<]+[^>]+>\s+<img[^<]+src="([^"]+)">\s+', re.DOTALL | re.IGNORECASE).findall(data)
    for model, url, img in model_list:
        name = model.replace("'s webcam","").strip()
        videourl = "http://new.naked.com" + url
        utils.addDownLink(name, videourl, 482, img, '', noDownload=True)
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #46
0
ファイル: camsoda.py プロジェクト: anton40/WhiteCream-V0.0.1
def clean_database(showdialog=True):
    conn = sqlite3.connect(xbmc.translatePath("special://database/Textures13.db"))
    try:
        with conn:
            list = conn.execute("SELECT id, cachedurl FROM texture WHERE url LIKE '%%%s%%';" % "m.camsoda.com")
            for row in list:
                conn.execute("DELETE FROM sizes WHERE idtexture LIKE '%s';" % row[0])
                try: os.remove(xbmc.translatePath("special://thumbnails/" + row[1]))
                except: pass
            conn.execute("DELETE FROM texture WHERE url LIKE '%%%s%%';" % "m.camsoda.com")
            if showdialog:
                utils.notify('Finished','Camsoda images cleared')
    except:
        pass
コード例 #47
0
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('<div class="thumb">.*?href="([^"]+)".*?src="([^"]+)".*?alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 142, img, '')
    try:
        nextp=re.compile('<a class="nextpostslink" rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', nextp[0], 141,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #48
0
ファイル: nudeflix.py プロジェクト: anton40/WhiteCream-V0.0.1
def NFList(url,page=1):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('href="([^"]+)" class="link">[^"]+?"([^"]+)" alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        videopage = 'http://www.nudeflix.com' + videopage
        utils.addDir(name, videopage, 42, img, '')
    if re.search("<strong>next &raquo;</strong>", listhtml, re.DOTALL | re.IGNORECASE):
        npage = page + 1        
        url = url.replace('page='+str(page),'page='+str(npage))
        utils.addDir('Next Page ('+str(npage)+')', url, 41, '', npage)
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #49
0
def Search(url):
    keyword = utils._get_keyboard(heading="Searching for...")
    if (not keyword): return False, 0
    try:
        response = utils.getHtml(url + keyword)
    except:
        utils.notify('Model not found - try again')
        return None
    match = re.compile("p_signupargs: 'smid%3D([^']+)'", re.DOTALL | re.IGNORECASE).findall(response)
    if match:
        utils.notify('Found ' + keyword + ' adding to favorites now')
        img = "http://m1.nsimg.net/media/snap/" + match[0] + ".jpg"
        performerID = match[0]
        name = keyword
        favorites.Favorites('add', 518, name, performerID, img)
コード例 #50
0
ファイル: xxxsorg.py プロジェクト: anton40/WhiteCream-V0.0.1
def List(url):
    try:
        html = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('<div class="entry-content">.*?<img src="([^"]+)".*?<a href="([^"]+)" class="more-link">.+?<span class="screen-reader-text">([^"]+)</span>', re.DOTALL | re.IGNORECASE).findall(html)
    for img, videopage, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 422, img, '')
    try:
        nextp = re.compile('<a class="next.*?href="(.+?)">', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 421,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #51
0
ファイル: hqporner.py プロジェクト: anton40/WhiteCream-V0.0.1
def HQPLAY(url, name, download=None):
    videopage = utils.getHtml(url, url)
    iframeurl = re.compile(r'<iframe\swidth="\d+"\sheight="\d+"\ssrc="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(videopage)
    #if re.search('hqporner', iframeurl[0], re.DOTALL | re.IGNORECASE):
    #    videourl = getHQ(iframeurl[0])
    if re.search('bemywife', iframeurl[0], re.DOTALL | re.IGNORECASE):
        videourl = getBMW(iframeurl[0])
    elif re.search('5\.79', iframeurl[0], re.DOTALL | re.IGNORECASE):
        videourl = getIP(iframeurl[0])
    elif re.search('flyflv', iframeurl[0], re.DOTALL | re.IGNORECASE):
        videourl = getFly(iframeurl[0])
    else:
        utils.notify('Oh oh','Couldn\'t find a supported videohost')
        return
    utils.playvid(videourl, name, download)
コード例 #52
0
def List(url):
    try:
        html = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile(r'data-id="\d+" title="([^"]+)" href="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(html)
    for name, videopage, img in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 412, img, '')
    try:
        nextp = re.compile('<link rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 411,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #53
0
ファイル: anybunny.py プロジェクト: anton40/WhiteCream-V0.0.1
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile(r"<a href='([^']+).*?src='([^']+)' id=\d+ alt='([^']+)'", re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 322, img, '')
    try:
        nextp = re.compile('href="([^"]+)">Next', re.DOTALL | re.IGNORECASE).findall(listhtml)
        utils.addDir('Next Page', nextp[0], 321,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #54
0
ファイル: camsoda.py プロジェクト: anton40/WhiteCream-V0.0.1
def List(url):
    if utils.addon.getSetting("chaturbate") == "true":
        clean_database(False)
    try:
        response = utils.getHtml(url)
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    data = json.loads(response)
    for camgirl in data['results']:
        name = camgirl['slug'] + " [" + camgirl['status'] + "]"
        videourl = "https://www.camsoda.com/api/v1/video/vtoken/" + camgirl['slug'] + "?username=guest_" + str(random.randrange(100, 55555))
        img = "https:" + camgirl['thumb']
        utils.addDownLink(name, videourl, 478, img, '', noDownload=True)
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #55
0
ファイル: vporn.py プロジェクト: anton40/WhiteCream-V0.0.1
def List(url):
    xbmc.log("List: " + url)
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile(r'<a href="(.+?)" class="thumb"><img src="(.+?)" alt="(.+?)"').findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 502, img, '')
    try:
        nextp = re.compile('<a class="next" href="(.+?)">').findall(listhtml)
        utils.addDir('Next Page', url[:url.rfind('/')+1] + nextp[0], 501,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #56
0
ファイル: mrsexe.py プロジェクト: anton40/WhiteCream-V0.0.1
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('thumb-list(.*?)<ul class="right pagination">', re.DOTALL | re.IGNORECASE).findall(listhtml)
    match1 = re.compile(r'<li class="[^"]*">\s<a class="thumbnail" href="([^"]+)">\n<script.+?</script>\n<figure>\n<img  id=".+?" src="([^"]+)".+?/>\n<figcaption>\n<span class="video-icon"><i class="fa fa-play"></i></span>\n<span class="duration"><i class="fa fa-clock-o"></i>([^<]+)</span>\n(.+?)\n', re.DOTALL | re.IGNORECASE).findall(match[0])
    for videopage, img, duration, name in match1:
        name = utils.cleantext(name) + ' [COLOR deeppink]' + duration + '[/COLOR]'
        utils.addDownLink(name, 'http://www.mrsexe.com/' + videopage, 402, img, '')
    try:
        nextp=re.compile(r'<li class="arrow"><a href="(.+?)">suivant</li>').findall(listhtml)
        utils.addDir('Next Page', 'http://www.mrsexe.com/' + nextp[0], 401,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #57
0
def List(url):
    try:
        html = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('id="wrapper"(.*?)sayfala', re.DOTALL | re.IGNORECASE).findall(html)[0]
    match1 = re.compile('<div class="titleFilm"><a href="([^"]+)">([^<]+)<.*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(match)
    for videopage, name, img in match1:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 432, img, '')
    try:
        nextp = re.compile('rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(html)
        utils.addDir('Next Page', nextp[0], 431,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #58
0
ファイル: czechhd.py プロジェクト: anton40/WhiteCream-V0.0.1
def List(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('<div id="main">(.*?)<div id="sidebar', re.DOTALL | re.IGNORECASE).findall(listhtml)[0]
    match1 = re.compile(r'data-id="\d+" title="([^"]+)" href="([^"]+)".*?src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(match)
    for name, videopage, img in match1:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 312, img, '')
    try:
        nextp = re.compile('href="([^"]+)" >Next', re.DOTALL | re.IGNORECASE).findall(match)
        utils.addDir('Next Page', nextp[0], 311,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)
コード例 #59
0
def TPNList(url):
    try:
        listhtml = utils.getHtml(url, '')
    except:
        utils.notify('Oh oh','It looks like this website is down.')
        return None
    match = re.compile('class="item">.*?<a href="([^"]+)".*?img src="([^"]+)" alt="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
    for videopage, img, name in match:
        name = utils.cleantext(name)
        utils.addDownLink(name, videopage, 122, img, '')
    try:
        nextp=re.compile('link rel="next" href="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(listhtml)
        next = nextp[0]
        utils.addDir('Next Page', os.path.split(url)[0] + '/' + next, 121,'')
    except: pass
    xbmcplugin.endOfDirectory(utils.addon_handle)