Пример #1
0
def Browse_EpisodesShniden(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url + '/episodes')
    html = GetDataBeetwenMarkers(html, 'list-episode-checkboxes', '</tbody>', False)[1]
    html = html.replace('\r\n', '')
    html = html.replace(' ', '')
    data = re.findall('<td>(.+?)</td>(.+?)<ahref="(.+?)"class="buttonactive">', html)
    ItemCount = len(data)
    for item in data:
        strona = mainSite5 + item[2]
        if 'fafa-fwfa-times' in item[1]:
            name2 = ' - niedostępny'
        else:
            name2 = ''
        name = "Odcinek " + html_entity_decode(item[0]) + name2
        img = ''
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': strona, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'PlayShniden', 'site': site, 'section': section, 'title': name, 'url': strona, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Пример #2
0
def Browse_EpisodesAnimeon(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    if "Odcinków w poczekalni" in html:
        url = url.replace('http://animeon.pl/anime/', 'http://animeon.pl/anime/poczekalnia/')
    else:
        url = url
    html = nURL(url)
    html = GetDataBeetwenMarkers(html, '<h2 class="float-left">Odcinki</h2>', '<div class="float-left"><h2 class="commentsFormH">Komentarze</h2></div>', False)[1]
    data = re.findall("<a href='(.+?)' title='(.+?)' ><strong>", html)
    ItemCount = len(data)
    for item in data:
        url = item[0]
        name = item[1].replace('odcinek', 'Odcinek')
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': url, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'Version', 'site': site, 'section': section, 'title': name, 'url': url, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Пример #3
0
def Browse_ItemRecenzje(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    html = GetDataBeetwenMarkers(html, '<div class="yt-lockup-content">',
                                 '<span class="yt-spinner">', False)[1]
    data = re.findall(
        'href="(.+?)">(.+?)</a><span class="accessible-description"', html)
    ItemCount = len(data)
    for item in data:
        strona = 'plugin://plugin.video.youtube/?action=play_video&videoid=%s' % item[
            0].replace('/watch?v=', '')
        name = item[1].encode("ascii", 'replace')
        fanart = fanartAol
        img = 'https://i.ytimg.com/vi_webp/' + item[0].replace(
            '/watch?v=', '') + '/mqdefault.webp'
        plot = ''
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
        contextLabs = {
            'title': name,
            'year': '0000',
            'url': strona,
            'img': img,
            'fanart': fanart,
            'DateAdded': '',
            'plot': labs['plot']
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlayFromHost',
            'site': site,
            'section': section,
            'title': name,
            'url': strona,
            'img': img,
            'fanart': fanart
        }
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Пример #4
0
def Browse_Aktualnosci(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    r = re.compile("<div class='head'><h2><a href='/news/(.+?)'>(.+?)</a>").findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for _url, _name in r:
            strona = 'http://diff-anime.pl' + '/news/' + _url
            html2 = nURL(strona)
            _name2 = clean_html(_name)
            _name2 = _name.replace(";", "")
#
            idx = html2.find("class='news-category' />")
            if idx == -1:
                return
            idx2 = html2.find("</div>", idx)
            if idx2 == -1:
                return
            plot = html2[idx:idx2]
            plot = clean_html(plot)
            plot = plot.replace("class='news-category' />", "")

#
            image = re.compile("<div class='content'><img src='(.+?)' alt='(.+?)' class='news-category' />(.+?).<br />").findall(html2)
            ItemCount = len(image)
            if len(image) > 0:
                for foto, plot1, plot2 in image:
                    img = "http://diff-anime.pl" + foto
            fanart = fanartSite
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
# YOUTUBE LINK
            _link = re.compile('src="//www.youtube.com/embed/(.+?)"').findall(html2)
            ItemCount = len(_link)
            if len(_link) > 0:
                for link in _link:
                    _url = 'plugin://plugin.video.youtube/?action=play_video&videoid=%s' % link
            contextLabs = {'title': _name2, 'year': '0000', 'url': strona, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name2, 'url': _url, 'img': img, 'fanart': fanart}
            labs['title'] = _name2
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('tvshows-view')))
    eod()
Пример #5
0
def Browse_Version(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    html = GetDataBeetwenMarkers(html, "<div class='version-list'>", "</ul>", False)[1]
    data = re.findall("<li><a href='(.+?)'>(.+?)</a><li>", html)
    ItemCount = len(data)
    for item in data:
        url = mainSite + item[0].replace('http://animeon.pl/', '')
        print url
        name = item[1]
        print name
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
        html = nURL(url)
        html = GetDataBeetwenMarkers(html, "<div class='float-left player-container'>", "</div>", False)[1]
        data = re.findall("<iframe src='(.+?)' allowfullscreen", html)
        for item in data:
            html = nURL(item)
            data = re.findall("src='(.+?)'", html)
            for item in data:
                url2 = item
                print url2
                if ('video.sibnet.ru' in url2):
                        url2 = url2.replace('swf', 'php')
                elif ('archive.org' in url2):
                        url2 = url2.replace('http:', '')
                        url2 = 'http:' + url2
                elif ('animeon.com.pl/episodes/players/vk.php' in url2):
                        html = nURL(url2)
                        data = re.findall("src='(.+?)'", html)
                        for item in data:
                            url2 = item
###
            contextLabs = {'title': name, 'year': '0000', 'url': url, 'fanart': fanart, 'DateAdded': ''}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': name, 'url': url2, 'fanart': fanart}
            labs['title'] = name
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('tvshows-view')))
    eod()
Пример #6
0
def Browse_GenreShniden(url, content='episodes'):
    if url == '':
        return
    html = nURL(url)
    r = re.compile(
        '<input id=".+?"  type="checkbox" name="genre.." value="(.+?)">\n(.+?)</label'
    ).findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for title, xx in r:
            _url = mainSite5 + 'animelist/index.php?genre[]=' + title
            _name = title
            print _name
            _title = _name
            img = iconShniden
            labs = {}
            strona = _url
            contextLabs = {
                'title': _name,
                'year': '0000',
                'url': _url,
                'img': img,
                'fanart': fanartAol,
                'DateAdded': ''
            }
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {
                'mode': 'Pageshniden',
                'site': site,
                'section': section,
                'title': _name,
                'url': strona,
                'fanart': fanartAol
            }
            labs['title'] = _title
            _addon.add_directory(pars,
                                 labs,
                                 is_folder=True,
                                 fanart=fanartAol,
                                 img=img,
                                 contextmenu_items=contextMenuItems,
                                 total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Пример #7
0
def Browse_PlayShniden(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    r = re.compile('{"online_id":"(.+?)","player":"(.+?)"').findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url, player in r:
            url = _url
            strona = url
            _name = player
            _title = player
            fanart = fanartAol
            labs = {}
            img=''
            contextLabs = {'title': _name, 'year': '0000', 'url': _url, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': ''}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayShniden2', 'site': site, 'section': section, 'title': _name, 'url': strona, 'img': img, 'fanart': fanart}
            labs['title'] = _title
            _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Пример #8
0
def Browse_PlayShniden(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    idx = html.find('<!-- tab containers -->')
    if idx == -1:
        return
    idx2 = html.find("<script>", idx)
    if idx2 == -1:
        return
    data = html[idx:idx2]
    r = re.compile("flashvars=.+?hd\.file=(.+?)&").findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for _url in r:
            url = _url
    r = re.compile('<iframe src="http://(.+?)"').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for _url in r:
            url = _url
    r = re.compile('<embed src="http://(.+?) quality="high" ').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for _url in r:
            url = _url
    r = re.compile('flashvars="streamer=(.+?)"').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for _url in r:
            url = _url
    r = re.compile('src="(.+?)"').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for _url in r:
            print _url
            url = _url
            print url
            if ('vk' in url):
                _name = 'VK'
            elif ('google' in url):
                _name = 'Google video'
            elif ('video.sibnet.ru' in url):
                url = url.replace('swf', 'php')
                print url
                _name = 'Sibnet.ru'
            elif ('mp4upload.com' in url):
                _name = 'Mp4upload'
            elif ('dailymotion' in url):
                _name = 'Dailymotion'
            elif ('tune.pk' in url):
                _name = 'Tune'
            elif ('archive.org' in url):
                _name = 'Archive'
                url = url.replace('http:', '')
                url = 'http:' + url
            elif ('www.wrzuta.pl' in url):
                _name = 'Wrzuta'
            elif ('http://myvi.ru/' in url):
                _name = 'Myvi.ru - brak obsługi'
            elif ('anime-shinden.info/player' in url):
                _name = 'AnimeShniden player'
            elif ('peteava.ro' in url):
                _name = 'Peteava'
            elif ('vplay.ro' in url):
                _name = 'Vplay'
            else:
                _name = 'Inny Host'
            fanart = fanartAol
            labs = {}
            contextLabs = {
                'title': _name,
                'year': '0000',
                'url': url,
                'fanart': fanart,
                'DateAdded': ''
            }
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {
                'mode': 'PlayFromHost',
                'site': site,
                'section': section,
                'title': _name,
                'url': url,
                'fanart': fanart
            }
            labs['title'] = _name
            _addon.add_directory(pars,
                                 labs,
                                 is_folder=False,
                                 fanart=fanart,
                                 contextmenu_items=contextMenuItems,
                                 total_items=ItemCount)
    set_view(content, int(addst('tvshows-view')))
    eod()
Пример #9
0
def Browse_EpisodesShniden(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    idx = html.find('><div id="news-id')
    if idx == -1:
        return
    idx2 = html.find('</td>', idx)
    if idx2 == -1:
        return
    htmllink = html[idx:idx2]
    r = re.compile('<a href=".+?(/.+?.html)".+?>(?:<b>)*(.+?)(?:</b>)*</a>'
                   ).findall(htmllink)
    ItemCount = len(r)
    if len(r) > 0:
        for _url, _tytul in r:
            _name = _tytul
            _url = 'http:' + _url
            _title = _name
            #            image = re.compile("<img src='http://(.+?)' style='margin:2px").findall(html)
            #           ItemCount = len(image)
            ##             for foto in image:
            #                img = "http://" + foto
            #       else:
            #          image = re.compile("<img src='(.+?)' style='margin:").findall(html)
            #         ItemCount = len(image)
            ####     else:
            #        img = ""
            img = ''
            fanart = fanartAol
            #            opis = re.compile('<font face="Trebuchet MS">(.+?)</font>').findall(html)
            #            ItemCount = len(opis)
            #            if len(opis) > 0:
            #                for desc in opis:
            plot = ""
            strona = _url
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''


###
            contextLabs = {
                'title': _name,
                'year': '0000',
                'url': _url,
                'img': img,
                'fanart': fanart,
                'DateAdded': '',
                'plot': labs['plot']
            }
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {
                'mode': 'PlayShniden',
                'site': site,
                'section': section,
                'title': _name,
                'url': strona,
                'img': img,
                'fanart': fanart
            }
            labs['title'] = _title
            _addon.add_directory(pars,
                                 labs,
                                 is_folder=True,
                                 fanart=fanart,
                                 img=img,
                                 contextmenu_items=contextMenuItems,
                                 total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
def Browse_EpisodesCentrum(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    html = messupText(html, True, True)
    s = '<a href="http://(.+?)">Odcinek(.+?)</a>'
    matches = re.compile(s).findall(html)
    ItemCount = len(matches)
    if ItemCount > 0:
        for _url, _nazwa in matches:
            _url2 = 'http://' + urllib.quote(_url)
            _name = 'Odcinek' + _nazwa
            _title = '' + cFL_(_name)
            #  grafika
            image = re.compile(
                '<meta property="og:image" content="(.+?)" />').findall(html)
            ItemCount = len(image)
            if len(image) > 0:
                for foto in image:
                    img = foto
            else:
                img = ""
#  fanart
            image2 = re.compile(
                '<!--dle_image_begin:(.+?)</a><!--dle_image_end-->').findall(
                    html)
            ItemCount = len(image2)
            if len(image2) > 0:
                for foto2 in image2:
                    strona2 = foto2
                    image3 = re.compile('http:(.+?).jpg').findall(strona2)
                    ItemCount = len(image3)
                    if len(image3) > 0:
                        for foto3 in image3:
                            fanart = "http:" + foto3 + ".jpg"
                    else:
                        fanart = img
#  opis
            opis = re.compile('<strong>Opis:</strong>(.+)').findall(html)
            ItemCount = len(opis)
            if len(opis) > 0:
                for desc in opis:
                    plot = desc
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
#  wyciąganie linku do mp4
            html2 = nURL(_url2)
            _link = re.compile('file: "(.+?)"').findall(html2)
            #            _link = re.compile("<source src='(.+?)' type='video/mp4' />").findall(html2)
            ItemCount = len(_link)
            if len(_link) > 0:
                for link in _link:
                    strona = link.replace(' ', '%20')
###
            contextLabs = {
                'title': _name,
                'year': '0000',
                'url': _url2,
                'img': img,
                'fanart': fanart,
                'DateAdded': '',
                'plot': labs['plot']
            }
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {
                'mode': 'PlayFromHost',
                'site': site,
                'section': section,
                'title': _name,
                'url': strona,
                'img': img,
                'fanart': fanart
            }
            labs['title'] = _title
            _addon.add_directory(pars,
                                 labs,
                                 is_folder=False,
                                 fanart=fanart,
                                 img=img,
                                 contextmenu_items=contextMenuItems,
                                 total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Пример #11
0
def Browse_EpisodesDiff(url, page='', content='episodes', view='515'):
    html = gethtml.get(url + '/odcinki', addonPath)
    htmlplot = gethtml.get(url , addonPath)
    html = messupText(html, ciastko, True, True)
    s = "#(.+?)</div><div class=.+?</div><div class='con3'><a href='(.+?)' class='i'>"
    matches = re.compile(s).findall(html)
    ItemCount = len(matches)
    if ItemCount > 0:
        for  _nazwa, _url in matches:
            _url2 = 'http://diff-anime.pl' + _url
            _name = 'Odcinek' + _nazwa
            _title = '' + _name
#  grafika
            image = re.compile("</div><div class='content'><div class='con'><a href='(.+?)' class='fbox'>").findall(html)
            ItemCount = len(image)
            if len(image) > 0:
                for foto in image:
                    img = "http://diff-anime.pl" + foto
            else:
                    img = ""
#  fanart
            if "Nie dodano kadrów do tej serii." in html:
                fanart = fanartSite
            else:
                image2 = re.compile("<h2>Kadry</h2></div><div class='content'><a href='(.+?)' class='fbox'>").findall(html)
                ItemCount = len(image)
                if len(image) > 0:
                    for _fanart in image2:
                        fanart = "http://diff-anime.pl" + _fanart
                else:
                        fanart = img
#  opis
            opis = re.compile("<h2>Opis anime</h2></div><div class='content'><div class='con'>(.+?)</div>").findall(htmlplot)
            ItemCount = len(opis)
            if len(opis) > 0:
                for desc in opis:
                    plot = unicode(desc,"utf-8")
            else:
                    opis = re.compile("<h2>Opis anime</h2></div><div class='content'><div class='con'>(.+?)<").findall(htmlplot)
                    ItemCount = len(opis)
                    if len(opis) > 0:
                        for desc in opis:
                            plot = unicode(desc,"utf-8")
                    else:
                            opis = re.compile("<div id='pDesc' class='panel'><div class='head'><h2>Opis anime</h2></div><div class='content'><div class='con'>(.+?)<br />").findall(htmlplot)
                            ItemCount = len(opis)
                            if len(opis) > 0:
                                for desc in opis:
                                    plot = unicode(desc,"utf-8")
                            else:
                                    plot = ""
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
#  wyciąganie linku do mp4
            html2 = gethtml.get(_url2, addonPath)
            _link = re.compile("'file': '(.+?)',").findall(html2)
            ItemCount = len(_link)
            if len(_link) > 0:
                for link in _link:
                    strona = link.replace(' ', '%20')
###
            contextLabs = {'title': _name, 'year': '0000', 'url': _url2, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name, 'url': strona, 'img': img, 'fanart': fanart}
            labs['title'] = _title
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Пример #12
0
def Browse_EpisodesAnime(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = GetDataBeetwenMarkers(
        nURL(url),
        '<div class="views-row views-row-1 views-row-odd views-row-first">',
        '</section> <!-- /.block -->', False)[1]
    data = re.findall(
        '<div class="field-content lista_odc_tytul_pozycja"><a href="/(.+?)">(.+?)</a>',
        html)
    ItemCount = len(data)
    print data
    for item in data:
        url2 = mainSite4 + item[0]
        name = item[1].encode("utf-8")
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {
            'title': name,
            'year': '0000',
            'url': url2,
            'img': img,
            'fanart': fanart,
            'DateAdded': '',
            'plot': labs['plot']
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlayAnime',
            'site': site,
            'section': section,
            'title': name,
            'url': url2,
            'img': img,
            'fanart': fanart
        }
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=True,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)


# next page
    npage = url[:-1] + str(int(url[-1:]) + 1)
    print 'bbb', npage
    if -1 != html.find("do strony "):
        _addon.add_directory(
            {
                'mode': 'EpisodesAnime',
                'site': site,
                'section': section,
                'url': npage,
                'page': npage
            }, {'title': "Next page"},
            is_folder=True,
            fanart=fanartAol,
            img=nexticon)
    set_view(content, view_mode=addst('links-view'))
    eod()
Пример #13
0
def Browse_PlayAnime(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = GetDataBeetwenMarkers(nURL(url), '<div class="content">',
                                 '<ul class=', False)[1]
    data = re.findall('<div class="field-item even">http(.+?)</div>', html)
    ItemCount = len(data)
    for item in data:
        url = item.replace("&hd=3", "")
        url = "http" + url.replace("amp;", "")
        print url
        if ('vk' in url):
            _name = 'VK'
        elif ('google' in url):
            _name = 'Google video'
        elif ('video.sibnet.ru' in url):
            _name = 'Sibnet.ru'
        elif ('mp4upload.com' in url):
            _name = 'Mp4upload'
        elif ('dailymotion' in url):
            _name = 'Dailymotion'
        elif ('tune.pk' in url):
            _name = 'Tune'
        elif ('archive.org' in url):
            _name = 'Archive'
            url = url.replace('http:', '')
            url = 'http:' + url
        elif ('www.wrzuta.pl' in url):
            _name = 'Wrzuta'
        elif ('vidfile' in url):
            _name = 'Vidfile'
        elif ('cloudy.ec' in url):
            _name = 'Cloudy'
        elif ('vshare' in url):
            _name = 'Vshare'
        else:
            _name = 'Inny Host'
        fanart = fanartAol
        labs = {}
        contextLabs = {
            'title': _name,
            'year': '0000',
            'url': url,
            'fanart': fanart,
            'DateAdded': ''
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlayFromHost',
            'site': site,
            'section': section,
            'title': _name,
            'url': url,
            'fanart': fanart
        }
        labs['title'] = _name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    set_view(content, int(addst('tvshows-view')))
    eod()
Пример #14
0
def Browse_PlayShniden2(url, page='', content='episodes', view='515'):
    if url == '':
        return
    urlload ='http://shinden.pl/xhr/'+ url +'/player_load'
    header = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36'
    nURL(urlload, User_Agent=header, cookie_file=cookie, load_cookie='', save_cookie=True)
    time.sleep(5)
    url = 'http://shinden.pl/xhr/'+ url +'/player_show'
    data = nURL(url, User_Agent=header, cookie_file=cookie, load_cookie=True)
    r = re.compile("flashvars=.+?hd\.file=(.+?)&").findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url in r:
            url = _url
    r = re.compile('<iframe src="http://(.+?)"').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url in r:
            url = _url
    r = re.compile('<embed src="http://(.+?) quality="high" ').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url in r:
            url = _url
    r = re.compile('flashvars="streamer=(.+?)"').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url in r:
            url = _url
    r = re.compile('src="(.+?)"').findall(data)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url in r:
            print _url
            url = _url
            print url
            if ('vk' in url):
                _name = 'VK'
            elif ('google' in url):
                _name = 'Google video'
            elif ('video.sibnet.ru' in url):
                url = url.replace('swf', 'php')
                print url
                _name = 'Sibnet.ru'
            elif ('mp4upload.com' in url):
                _name = 'Mp4upload'
            elif ('dailymotion' in url):
                _name = 'Dailymotion'
            elif ('tune.pk' in url):
                _name = 'Tune'
            elif ('archive.org' in url):
                _name = 'Archive'
                url = url.replace('http:', '')
                url = 'http:' + url
            elif ('www.wrzuta.pl' in url):
                _name = 'Wrzuta'
            elif ('http://myvi.ru/' in url):
                _name = 'Myvi.ru - brak obsługi'
            elif ('anime-shinden.info/player' in url):
                _name = 'AnimeShniden player'
            elif ('peteava.ro' in url):
                _name = 'Peteava'
            elif ('vplay.ro' in url):
                _name = 'Vplay'
            else:
                _name = 'Inny Host'
            fanart = fanartAol
            labs = {}
            contextLabs = {'title': _name, 'year': '0000', 'url': _url, 'img':'', 'fanart': fanart, 'DateAdded': '', 'plot': ''}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name, 'url': url, 'img': '', 'fanart': fanart}
            labs['title'] = _name
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img='', contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()