コード例 #1
0
def ListowanieMeczy():
    try:
        url = params['url']
        result = client.request(url)
        result_images = client.parseDOM(result,
                                        'article',
                                        attrs={'class': 'post hentry'})
        result = client.parseDOM(result,
                                 'h2',
                                 attrs={'class': 'post-title entry-title'})

        images = client.parseDOM(result_images, 'a', ret='content')
        links = client.parseDOM(result, 'a', ret='href')
        titles = client.parseDOM(result, 'a', ret='title')
        for item in zip(links, titles, images):
            link = str(item[0])
            title = str(item[1])
            image = str(item[2])
            addon.addDir(title,
                         link,
                         mode='ListowanieLinkow',
                         icon=image,
                         fanart=_default_background)
    except:
        log_exception()
コード例 #2
0
def ListujFilmy(url=""):
    try:
        url = urllib.unquote_plus(params['url'])
    except:
        pass
    result = client.request(url)
    h = HTMLParser()
    result = h.unescape(result)
    try:
        nawigacja = client.parseDOM(result,
                                    'div',
                                    attrs={'class': 'wp-pagenavi'})
        nastepna = client.parseDOM(nawigacja, 'a', ret='href')[-1]
        nawigacja = client.parseDOM(nawigacja,
                                    'a',
                                    attrs={'class': 'nextpostslink'})
    except:
        nawigacja = ""
    result = client.parseDOM(result, 'div', attrs={'id': 'left'})
    result = client.parseDOM(result, 'div', attrs={'id': 'news'})
    for item in result:
        link = client.parseDOM(item, 'a', ret='href')[0]
        nazwa = client.parseDOM(item, 'a')[0]
        addon.addLink(str(nazwa).replace("„", "").replace('”', ''),
                      str(link),
                      mode=6)
    if len(nawigacja) > 0:
        addon.addDir("Nastepna strona", str(nastepna), mode=10)
コード例 #3
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def Rankingi(counter):
    url = params['url']
    r = client.request(url)

    result = client.parseDOM(
        r,
        'table',
        attrs={
            'class': 'table table-bordered table-striped table-hover ranking'
        })
    linki = client.parseDOM(result, 'a', ret='href')
    nazwy = client.parseDOM(result, 'a')
    n = 1
    try:
        for link in linki:
            linki[counter] = 'http://animezone.pl' + linki[counter]
            addon.addDir(str(n) + ". " + str(nazwy[counter]).replace(
                "<mark>", "").replace("</mark>", ""),
                         linki[counter],
                         mode=4)
            counter += 1
            n += 1
    except:
        log_exception()
        pass
コード例 #4
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def list_episodes(nazwaSerii, wersja, fanart):
    lista = []
    lista_tytulow = []
    ocena = []

    cookie = cache.cache_get('strefadb_cookie')['value']
    if type(cookie) is dict:
        cookie = cookie['value']
    HEADERS['Cookie'] = cookie

    url = 'https://strefadb.pl/odcinki/' + nazwaSerii + '.html'
    result = s.get(url, headers=HEADERS).content
    test = client.parseDOM(result, 'ul', attrs={'class': 'lista-odcinkow'})
    test = client.parseDOM(test, 'li')
    for item in test:
        if 'a href' in item and '?typ' not in item and not 'ul class' in item:
            lista.append(item)
    for item in lista:
        try:
            item = client.parseDOM(item, 'a')
            lista_tytulow.append(str(item[0]))
            ocena.append(float(lista_tytulow[-1][-5:-1]))
            lista_tytulow[-1] = lista_tytulow[-1][:-7]
        except:
            pass
    i = 1
    while i < len(lista_tytulow) + 1:
        url = 'https://strefadb.pl/odcinki/' + nazwaSerii + '-' + str(
            i) + '.html'
        addon.addDir(str(i) + ' ' + str(lista_tytulow[i - 1]),
                     url,
                     mode='ListowanieLinkow',
                     fanart=fanart,
                     rating=ocena[i - 1])
        i += 1
コード例 #5
0
def work(items, start, end):
    for item in items[start:end]:
        try:
            h = HTMLParser()
            item = h.unescape(item)
            link = str(client.parseDOM(item, 'a', ret='href')[0])
            title = str(client.parseDOM(item, 'a')[0])
            if title == "Gry": continue
            try:
                plot = str(client.parseDOM(item, 'a', ret='title')[0])
            except:
                log_exception()
                plot = ""
            fanart, banner, thumb = Tvdb_Scraper(title)
            addon.addDir(title,
                         link,
                         mode=11,
                         banner=banner,
                         thumb=thumb,
                         fanart=fanart,
                         plot=plot,
                         genre="Bajka")
        except Exception:
            log_exception()
            print('error with item')
コード例 #6
0
ファイル: main.py プロジェクト: Koscielny83/cherry-dev
def Wyszukiwanie_Nazwa():
    keyb = xbmc.Keyboard('', "Wyszukiwarka anime")
    keyb.doModal()
    if keyb.isConfirmed() and len(keyb.getText().strip()) > 0:
        search = keyb.getText()
        url = 'https://shinden.pl/titles?search=' + search + '&series_type%5B0%5D=TV&series_type%5B1%5D=Movie&series_type%5B2%5D=Special&series_status%5B0%5D=Proposal&series_status%5B1%5D=Currently+Airing&series_status%5B2%5D=Finished+Airing&one_online=true'
        data = {'url': url}
        r = requests.post("https://shinden.herokuapp.com/shinden",
                          data=data).content
        h = HTMLParser()
        r = h.unescape(r)

        result = [
            item
            for item in client.parseDOM(r, 'li', attrs={'class': 'desc-col'})
            if str(item).startswith("<h3>")
        ]
        obrazy = [
            _base_link + client.parseDOM(item, 'a', ret='href')[0]
            for item in client.parseDOM(r, 'ul', attrs={'class': 'div-row'})
            if '/res/images' in item
        ]
        linki = [
            _base_link + item
            for item in client.parseDOM(result, 'a', ret='href')
            if str(item).startswith("/titles")
        ]
        nazwy = [client.parseDOM(item, 'a')[0] for item in result]
        oceny = client.parseDOM(r, 'li', attrs={'class': 'rate-top'})

        for item in zip(linki, nazwy, oceny, obrazy):
            try:
                title = str(item[1]).replace("<em>", '').replace("</em>", '')
                addon.addDir(
                    title + " [COLOR ivory]([B]%s[/B])[/COLOR]" % str(item[2]),
                    str(item[0]) + "/all-episodes",
                    thumb=str(item[3]),
                    fanart=_default_background,
                    mode=4)
            except:
                continue
        try:
            strony = client.parseDOM(r, 'nav', attrs={'class': 'pagination'})
            strony = client.parseDOM(strony, 'li')
            link_nastepna = client.parseDOM(strony, 'a', ret='href')[-2]
            link_nastepna = urllib.unquote(link_nastepna).replace('amp;', '')
            if link_nastepna:
                addon.addDir("Następna strona...",
                             _base_link + link_nastepna,
                             mode=3,
                             fanart=_default_background)
        except Exception as e:
            print(e)
            pass
    else:
        CATEGORIES()
コード例 #7
0
def CATEGORIES():
    addon.addDir("Szukaj", '', mode=1)
    addon.addDir("Kategorie", "", mode=20)
    addon.addDir("Najnowsze filmy",
                 'https://dokumentalne.net/najnowsze-filmy/',
                 mode=10)
    addon.addDir("Filmy w HD",
                 'https://dokumentalne.net/category/hd-filmy/',
                 mode=10)
    addon.addDir("Wszystkie filmy",
                 'https://dokumentalne.net/category/wszystkie-filmy/',
                 mode=10)
コード例 #8
0
def ListujKategorie():
    kategorie = {
        "Astrofizyka":
        "http://www.filmydokumentalne.eu/kategorie/astrofizyka/",
        "Biograficzne":
        "http://www.filmydokumentalne.eu/kategorie/biograficzne/",
        "Dusze czyśćcowe":
        "http://www.filmydokumentalne.eu/kategorie/dusze-czysccowe/",
        "Ewangelizacyjne":
        "http://www.filmydokumentalne.eu/kategorie/ewangelizacyjne/",
        "Ewolucja":
        "http://www.filmydokumentalne.eu/kategorie/ewolucja-kategorie/",
        "Gadżeciarskie":
        "http://www.filmydokumentalne.eu/kategorie/gadzeciarskie/",
        "Historyczne":
        "http://www.filmydokumentalne.eu/kategorie/historyczne/",
        "II Wojna Światowa":
        "http://www.filmydokumentalne.eu/kategorie/ii-wojna-swiatowa-kategorie/",
        "Katastroficzne":
        "http://www.filmydokumentalne.eu/kategorie/katastroficzne/",
        "Kryminalne": "http://www.filmydokumentalne.eu/kategorie/kryminalne/",
        "Kultura i sztuka":
        "http://www.filmydokumentalne.eu/kategorie/kultura-i-sztuka/",
        "Lotnictwo":
        "http://www.filmydokumentalne.eu/kategorie/lotnictwo-kategorie/",
        "Medycyna": "http://www.filmydokumentalne.eu/kategorie/medycyna/",
        "Motoryzacja":
        "http://www.filmydokumentalne.eu/kategorie/motoryzacja-kategorie/",
        "Nauka": "http://www.filmydokumentalne.eu/kategorie/nauka/",
        "Obcojezyczne":
        "http://www.filmydokumentalne.eu/kategorie/obcojezyczne/",
        "Paranormalne":
        "http://www.filmydokumentalne.eu/kategorie/paranormalne-2/",
        "Podróżnicze":
        "http://www.filmydokumentalne.eu/kategorie/podroznicze/",
        "Polityczne": "http://www.filmydokumentalne.eu/kategorie/polityczne/",
        "Pozostale": "http://www.filmydokumentalne.eu/kategorie/pozostale/",
        "Przetrwanie":
        "http://www.filmydokumentalne.eu/kategorie/przetrwanie-kategorie/",
        "Przyrodnicze":
        "http://www.filmydokumentalne.eu/kategorie/przyrodnicze/",
        "Religijne": "http://www.filmydokumentalne.eu/kategorie/religijne/",
        "Sport": "http://www.filmydokumentalne.eu/kategorie/sport/",
        "Spoleczenstwo":
        "http://www.filmydokumentalne.eu/kategorie/spoleczenstwo/",
        "Technika": "http://www.filmydokumentalne.eu/kategorie/technika/",
        "Wojskowe": "http://www.filmydokumentalne.eu/kategorie/wojskowe/",
    }
    for item in kategorie:
        addon.addDir(str(item), str(kategorie[item]), mode=10)
    xbmcplugin.addSortMethod(handle=int(sys.argv[1]),
                             sortMethod=xbmcplugin.SORT_METHOD_TITLE)
コード例 #9
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def Alfabetycznie():
    url = 'http://animezone.pl'

    r = client.request('https://www.animezone.pl/anime/lista')

    result = client.parseDOM(r,
                             'div',
                             attrs={'class': 'btn-group btn-group-xs'})
    linki_litery = client.parseDOM(result, 'a', ret='href')
    litery = client.parseDOM(result, 'a')
    counter = 0
    for link in linki_litery:
        link = url + link
        addon.addDir(str(litery[counter]), link, mode=3)
        counter += 1
コード例 #10
0
ファイル: main.py プロジェクト: Koscielny83/cherry-dev
def ListowanieAnime():
    url = params['url']
    data = {'url': url}
    r = requests.post("https://shinden.herokuapp.com/shinden",
                      data=data).content
    h = HTMLParser()
    r = h.unescape(r)

    result = [
        item for item in client.parseDOM(r, 'li', attrs={'class': 'desc-col'})
        if str(item).startswith("<h3>")
    ]
    obrazy = [
        _base_link + client.parseDOM(item, 'a', ret='href')[0]
        for item in client.parseDOM(r, 'ul', attrs={'class': 'div-row'})
        if '/res/images' in item
    ]
    linki = [
        _base_link + item for item in client.parseDOM(result, 'a', ret='href')
        if str(item).startswith("/titles")
    ]
    nazwy = [client.parseDOM(item, 'a')[0] for item in result]
    oceny = client.parseDOM(r, 'li', attrs={'class': 'rate-top'})

    for item in zip(linki, nazwy, oceny, obrazy):
        try:
            addon.addDir(str(item[1]) +
                         " [COLOR ivory]([B]%s[/B])[/COLOR]" % str(item[2]),
                         str(item[0]) + "/all-episodes",
                         thumb=str(item[3]),
                         mode=4,
                         fanart=_default_background)
        except:
            continue
    try:
        strony = client.parseDOM(r, 'nav', attrs={'class': 'pagination'})
        strony = client.parseDOM(strony, 'li')
        link_nastepna = client.parseDOM(strony, 'a', ret='href')[-2]
        link_nastepna = urllib.unquote(link_nastepna).replace('amp;', '')
        if link_nastepna:
            addon.addDir("Następna strona...",
                         _base_link + link_nastepna,
                         mode=3,
                         fanart=_default_background)
    except Exception as e:
        print(e)
        pass
コード例 #11
0
ファイル: main.py プロジェクト: Koscielny83/cherry-dev
def CATEGORIES():
    addon.addDir("Szukaj po nazwie", '', mode=1, fanart=_default_background)
    addon.addDir("Filtruj", '', mode=2, fanart=_default_background)
    addon.addDir("Alfabetycznie", '', mode=10, fanart=_default_background)
    addon.addDir(
        "Ranking najlepiej ocenianych",
        'https://shinden.pl/titles?series_type%5B0%5D=TV&one_online=true&sort_by=ranking-rate&sort_order=desc',
        mode=3,
        fanart=_default_background)
コード例 #12
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def ListowanieAnime():
    url = params['url']

    r = client.request(url)

    result2 = client.parseDOM(r,
                              'div',
                              attrs={'class': 'panel-body categories-newest'
                                     })  ## na obrazy
    obrazy = client.parseDOM(result2, 'img', ret='src')
    result = client.parseDOM(r,
                             'div',
                             attrs={'class': 'description pull-right'
                                    })  ## na linki i opisy
    linki = client.parseDOM(result, 'a', ret='href')
    nazwy = client.parseDOM(result, 'a')
    opisy = client.parseDOM(result, 'p')

    counter = 0
    for link in linki:
        linki[counter] = 'http://animezone.pl' + linki[counter]
        obrazy[counter] = 'http://animezone.pl' + obrazy[counter]
        addon.addDir(str(nazwy[counter]).replace("<mark>",
                                                 "").replace("</mark>", ""),
                     linki[counter],
                     mode=4,
                     thumb=obrazy[counter],
                     plot=opisy[counter])
        counter += 1
    try:
        strony = client.parseDOM(r, 'ul', attrs={'class': 'pagination'})
        strony = client.parseDOM(strony, 'li')
        link_nastepna = client.parseDOM(strony, 'a', ret='href')[-1]
        # nastepna strona
        for strona in strony:
            strona = client.parseDOM(strona, 'a')
            if len(strona) > 0:
                strona = str(strona[0])
                if strona == "&raquo;":
                    addon.addDir("Nastpna strona..",
                                 'http://animezone.pl' + link_nastepna,
                                 mode=3)
    except:
        log_exception()
        pass
コード例 #13
0
def ListujKategorie():
    kategorie = {
        "Astronomiczne":
        "https://dokumentalne.net/category/astronomiczne-kosmos/",
        "Biograficzne": "https://dokumentalne.net/category/biograficzne/",
        "Filmy HD": "https://dokumentalne.net/category/hd-filmy/",
        "Historyczne": "https://dokumentalne.net/category/historyczne/",
        "Katastroficzne": "https://dokumentalne.net/category/katastroficzne/",
        "Kryminalne": "https://dokumentalne.net/category/kryminalne/",
        "Motoryzacyjne": "https://dokumentalne.net/category/motoryzacyjne/",
        "Naukowe": "https://dokumentalne.net/category/naukowe/",
        "Podróżnicze": "https://dokumentalne.net/category/podroznicze/",
        "Przyrodnicze": "https://dokumentalne.net/category/przyrodnicze/",
        "Psychologiczne": "https://dokumentalne.net/category/psychologiczne/",
        "Spoleczeństwo": "https://dokumentalne.net/category/spoleczenstwo/",
        "Technologia": "https://dokumentalne.net/category/technologia/",
        "Wojenne": "https://dokumentalne.net/category/wojenne/"
    }
    for item in kategorie:
        addon.addDir(str(item), str(kategorie[item]), mode=10)
コード例 #14
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def ListowaniOdcinkow():
    url = params['url']
    iconimage = params.get('iconimage', '')

    r = client.request(url)
    result = client.parseDOM(
        r,
        'table',
        attrs={
            'class': 'table table-bordered table-striped table-hover episodes'
        })
    result = client.parseDOM(result, 'tbody')
    for tr in client.parseDOM(result, 'tr'):
        link = client.parseDOM(tr, 'a', ret='href')[0]
        nazwa = client.parseDOM(tr, 'td', attrs={'class': 'episode-title'})[0]
        odcinek = client.parseDOM(tr, 'strong')[0]
        lang = client.parseDOM(tr, 'span', ret='class')[0].split()[-1]
        nazwa = '{ep:02d}. {title} ({lang})'.format(title=nazwa,
                                                    ep=int(odcinek),
                                                    lang=lang)
        addon.addDir(nazwa, urljoin(url, link), mode=5, icon=iconimage)
コード例 #15
0
ファイル: main.py プロジェクト: Koscielny83/cherry-dev
def Alfabetycznie():
    url = "https://shinden.pl/titles"

    data = {'url': url}
    r = requests.post("https://shinden.herokuapp.com/shinden",
                      data=data).content
    h = HTMLParser()
    r = h.unescape(r)

    result = client.parseDOM(r, 'ul', attrs={'id': 'TabLetters'})
    literki = client.parseDOM(result, 'a')
    literki_linki = client.parseDOM(result, 'a', ret='href')

    for item in zip(literki, literki_linki):
        try:
            addon.addDir(str(item[0]),
                         str(url) + str(item[1]),
                         fanart=_default_background,
                         mode=3)
        except:
            continue
コード例 #16
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def Gatunki(link, numer):
    try:
        url = 'http://www.animezone.pl/gatunki'

        r = client.request(url)

        result = client.parseDOM(r, 'form', attrs={'class': 'species'})
        result = client.parseDOM(result, 'div', attrs={'class': 'panel-body'})
        value = client.parseDOM(result[numer], 'input', ret='value')
        nazwa = client.parseDOM(result[numer], 'input')
        counter = 0
        for n in nazwa:
            index = str(n).find('  ')
            n = n[:index]
            nazwa[counter] = n
            addon.addDir(str(nazwa[counter]),
                         link + str(value[counter]),
                         mode=3)
            counter += 1
    except:
        log_exception()
コード例 #17
0
def ListujFilmy(url=""):
    try:
        url = params['url']
    except:
        pass
    result = client.request(url)
    h = HTMLParser()
    result = h.unescape(result)
    try:
        nawigacja = client.parseDOM(result,
                                    'div',
                                    attrs={'class': 'wp-pagenavi'})
        nastepna = client.parseDOM(nawigacja, 'a', ret='href')[-2]
        nawigacja = client.parseDOM(nawigacja,
                                    'a',
                                    attrs={'class': 'nextpostslink'})
    except:
        nawigacja = ""
    result = client.parseDOM(result, 'div', attrs={'class': 'entry-content'})

    for item in result:
        item2 = client.parseDOM(item,
                                'div',
                                attrs={'class': 'picture-content '})
        if len(item2) == 0:
            continue
        opis = client.parseDOM(item,
                               'div',
                               attrs={'class': 'excerpt sub-lineheight'})[0]
        link = client.parseDOM(item2, 'a', ret='href')[0]
        nazwa = client.parseDOM(item2, 'a', ret='title')[0]
        obraz = client.parseDOM(item2, 'img', ret='src')[0]
        addon.addLink(str(nazwa),
                      str(link),
                      mode=6,
                      thumb=str(obraz),
                      icon=str(obraz),
                      plot=str(opis))
    if len(nawigacja) > 0:
        addon.addDir("Nastepna strona", str(nastepna), mode=10)
コード例 #18
0
ファイル: main.py プロジェクト: Koscielny83/cherry-dev
def ListowaniOdcinkow():
    url = params['url'].replace('//titles', '/titles')
    data = {'url': url}
    result = requests.post("https://shinden.herokuapp.com/shinden",
                           data=data).content
    h = HTMLParser()
    result = h.unescape(result)
    result = client.parseDOM(result,
                             'tbody',
                             attrs={'class': 'list-episode-checkboxes'})
    result = client.parseDOM(result, 'tr')
    for item in result:
        try:
            item2 = client.parseDOM(item, 'td')[0]
            title = client.parseDOM(item, 'td', attrs={'class': 'ep-title'})[0]
            addon.addDir('Odcinek ' + str(item2) + ' ' + str(title),
                         _base_link +
                         client.parseDOM(item, 'a', ret='href')[0],
                         mode=5,
                         fanart=_default_background)
        except:
            continue
コード例 #19
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def Najpopularniejsze():
    Najpopularniejsze_Lista = [('Kabaret Skeczów Męczących', '65'),
                               ('Kabaret Moralnego Niepokoju', '47'),
                               ('Kabaret Młodych Panów', '46'),
                               ('Kabaret Paranienormalni', '57'),
                               ('Kabaret Neo-Nówka', '50'),
                               ('Kabaret Ani Mru-Mru', '23'),
                               ('Kabaret Smile', '67'),
                               ('Kabaret Nowaki', '127'),
                               ('Kabaret Limo', '43'),
                               ('Kabaret Łowcy.B', '101'),
                               ('Kabaret Hrabi', '37'),
                               ('Kabaret Jurki', '38'),
                               ('Kabaret Pod Wyrwigroszem', '61'),
                               ('Kabaret OT.TO', '56'),
                               ('Formacja Chatelet', '5'),
                               ('Spadkobiercy', '111'), ('Cezary Pazura', '4'),
                               ('Kabaretowy Klub Dwójki', '225'),
                               ('Festiwale kabaretowe', '229'),
                               ('Piotr Bałtroczyk', '91')]
    results = Najpopularniejsze_Lista
    for item in results:
        addon.addDir(item[0], item[1], mode=4)
コード例 #20
0
def ListujKanaly():
    kanaly = {
        "Animal Planet":
        "http://www.filmydokumentalne.eu/kanaly/animal-planet/",
        "BBC": "http://www.filmydokumentalne.eu/kanaly/bbc/",
        "Canal+": "http://www.filmydokumentalne.eu/kanaly/canal/",
        "DC": "http://www.filmydokumentalne.eu/kanaly/dc/",
        "FokusTV": "http://www.filmydokumentalne.eu/kanaly/fokustv/",
        "HBO": "http://www.filmydokumentalne.eu/kanaly/hbo/",
        "History Channel":
        "http://www.filmydokumentalne.eu/kanaly/history-channel/",
        "NG": "http://www.filmydokumentalne.eu/kanaly/ng-kanaly/",
        "Planete": "http://www.filmydokumentalne.eu/kanaly/planete/",
        "Polsat": "http://www.filmydokumentalne.eu/kanaly/polsat/",
        "Polsat Play": "http://www.filmydokumentalne.eu/kanaly/polsat-play/",
        "Pozostale":
        "http://www.filmydokumentalne.eu/kanaly/pozostale-kanaly/",
        "TVN": "http://www.filmydokumentalne.eu/kanaly/tvn/",
        "TVP": "http://www.filmydokumentalne.eu/kanaly/tvp/",
    }
    for item in kanaly:
        addon.addDir(str(item), str(kanaly[item]), mode=10)
    xbmcplugin.addSortMethod(handle=int(sys.argv[1]),
                             sortMethod=xbmcplugin.SORT_METHOD_TITLE)
コード例 #21
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def Wyszukiwanie():
    keyb = xbmc.Keyboard('', "Wyszukiwarka anime")
    keyb.doModal()
    if keyb.isConfirmed() and len(keyb.getText().strip()) > 0:
        search = keyb.getText()

        url = "http://www.animezone.pl/szukaj?q=" + search
        r = client.request(url)

        result2 = client.parseDOM(
            r, 'div', attrs={'class':
                             'panel-body categories-newest'})  ## na obrazy
        obrazy = client.parseDOM(result2, 'img', ret='src')
        result = client.parseDOM(r,
                                 'div',
                                 attrs={'class': 'description pull-right'
                                        })  ## na linki i opisy
        linki = client.parseDOM(result, 'a', ret='href')
        nazwy = client.parseDOM(result, 'a')
        opisy = client.parseDOM(result, 'p')

        if len(linki) == 0:
            addon.addDir("Zbyt dużo lub brak wyników wyszukiwania :(", '')
            addon.addDir("Spróbuj doprecyzować zapytanie!", '')
        nazwy = client.parseDOM(result, 'a')

        counter = 0
        for link in linki:
            linki[counter] = 'http://animezone.pl' + linki[counter]
            obrazy[counter] = 'http://animezone.pl' + obrazy[counter]
            opisy[counter] = opisy[counter].replace("<mark>",
                                                    "").replace("</mark>", "")
            addon.addDir(str(nazwy[counter]).replace("<mark>", "").replace(
                "</mark>", ""),
                         linki[counter],
                         mode=4,
                         thumb=obrazy[counter],
                         plot=opisy[counter])
            counter += 1
    else:
        CATEGORIES()
コード例 #22
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def CATEGORIES():
    addon.addDir("Szukaj anime", '', mode=1)
    addon.addDir("Alfabetycznie", '', mode=10)
    addon.addDir("Alfabetyczniefilmy", '', mode=15)
    addon.addDir("Gatunki", '', mode=20)
    addon.addDir("Sezony", '', mode=30)
    addon.addDir("Rankingi", '', mode=40)
コード例 #23
0
ファイル: main.py プロジェクト: po50on/cherry-dev
def SUBCATEGORIES(mode='Lektor'):
    # Lektor
    xbmcplugin.setContent(int(sys.argv[1]), 'movies')
    if mode == 'Lektor':
        addon.addDir('Dragon Ball',
                     '-',
                     mode='ListowanieLektor',
                     icon=_resourcesPath + "DB.png",
                     thumb=_resourcesPath + "DB.png",
                     fanart=_default_background)
        addon.addDir('Dragon Ball Z',
                     '-',
                     mode='ListowanieLektor',
                     icon=_resourcesPath + "dbz.png",
                     thumb=_resourcesPath + "dbz.png",
                     fanart=_default_background)
        addon.addDir('Dragon Ball Kai',
                     '-',
                     mode='ListowanieLektor',
                     icon=_resourcesPath + "dbkai.png",
                     thumb=_resourcesPath + "dbkai.png",
                     fanart=_default_background)
        addon.addDir('Dragon Ball GT',
                     '-',
                     mode='ListowanieLektor',
                     icon=_resourcesPath + "dbgt.png",
                     thumb=_resourcesPath + "dbgt.png",
                     fanart=_default_background)
        addon.addDir('Dragon Ball Super',
                     '-',
                     mode='ListowanieLektor',
                     icon=_resourcesPath + "dbs.png",
                     thumb=_resourcesPath + "dbs.png",
                     fanart=_default_background)
        addon.addDir('Dragon Ball Heroes',
                     '-',
                     mode='ListowanieLektor',
                     icon=_resourcesPath + "dbh.png",
                     thumb=_resourcesPath + "dbh.png",
                     fanart=_default_background)
        addon.addDir('Kinowki',
                     '-',
                     mode='ListowanieLektor',
                     icon=_resourcesPath + "kino.jpg",
                     thumb=_resourcesPath + "kino.jpg",
                     fanart=_default_background)
コード例 #24
0
def HOME():
    addon.addDir("Bajki Alfabetycznie", "http://bajkionline.com/", mode=10)
コード例 #25
0
def HOME():
    addon.addDir("Bajki Alfabetycznie", "http://bajkipopolsku.com/", mode=10)
コード例 #26
0
ファイル: main.py プロジェクト: Koscielny83/cherry-dev
def get_by_select(stype=[], sort=0, status=0, genre=[], genopt=[], offset=0):
    if offset:
        CATEGORIES()
    else:
        genre_string = ''
        if type(genre) is str:
            genre_string = str(genopt[0]) + "&genres=i" + str(genre)
        if type(genre) is list:
            genre_string = str(genopt[0]) + "&genres=" + ';'.join(
                str('i' + str(x)) for x in genre)

        type_string = ''
        if type(stype) is str:
            type_string = str(str(stype))
        if type(stype) is list:
            type_string = str('&'.join(str(x) for x in stype))

        url = "https://shinden.pl/titles?&"
        if genre_string:
            url += "%s&%s&%s&one_online=true&" % (sort, status, genre_string)
        else:
            url += "%s&%s&one_online=true&" % (sort, status)
        url += type_string
        data = {'url': url}
        r = requests.post("https://shinden.herokuapp.com/shinden",
                          data=data).content
        h = HTMLParser()
        r = h.unescape(r)

        result = [
            item
            for item in client.parseDOM(r, 'li', attrs={'class': 'desc-col'})
            if str(item).startswith("<h3>")
        ]
        obrazy = [
            _base_link + client.parseDOM(item, 'a', ret='href')[0]
            for item in client.parseDOM(r, 'ul', attrs={'class': 'div-row'})
            if '/res/images' in item
        ]
        linki = [
            _base_link + item
            for item in client.parseDOM(result, 'a', ret='href')
            if str(item).startswith("/titles")
        ]
        nazwy = [client.parseDOM(item, 'a')[0] for item in result]
        oceny = client.parseDOM(r, 'li', attrs={'class': 'rate-top'})

        for item in zip(linki, nazwy, oceny, obrazy):
            try:
                title = str(item[1]).replace("<em>", '').replace("</em>", '')
                addon.addDir(
                    title + " [COLOR ivory]([B]%s[/B])[/COLOR]" % str(item[2]),
                    str(item[0]) + "/all-episodes",
                    thumb=str(item[3]),
                    mode=4,
                    fanart=_default_background)
            except:
                continue
        try:
            strony = client.parseDOM(r, 'nav', attrs={'class': 'pagination'})
            strony = client.parseDOM(strony, 'li')
            link_nastepna = client.parseDOM(strony, 'a', ret='href')[-2]
            link_nastepna = urllib.unquote(link_nastepna).replace('amp;', '')
            if link_nastepna:
                addon.addDir("Następna strona...",
                             _base_link + link_nastepna,
                             mode=3,
                             fanart=_default_background)
        except Exception as e:
            print(e)
            pass
コード例 #27
0
ファイル: main.py プロジェクト: po50on/cherry-dev
    ListowaniOdcinkow()

elif mode == 5:
    WysiwetlanieLinkow()

elif mode == 6:
    OdpalanieLinku()

elif mode == 10:
    Alfabetycznie()

elif mode == 15:
    Alfabetyczniefilmy()

elif mode == 20:
    addon.addDir("Typ widowni", '', mode=21)
    addon.addDir("Gatunek", '', mode=22)
    addon.addDir("Tematyka", '', mode=23)
    addon.addDir("Rok", '', mode=24)

elif mode == 21:
    Gatunki('http://www.animezone.pl/gatunki?type=', 0)

elif mode == 22:
    Gatunki('http://www.animezone.pl/gatunki?species[]=', 1)

elif mode == 23:
    Gatunki('http://www.animezone.pl/gatunki?topic[]=', 2)

elif mode == 24:
    Gatunki('http://www.animezone.pl/gatunki?years=', 3)
コード例 #28
0
def CATEGORIES():
    addon.addDir(
        "Premier Ligue",
        "http://www.replaymatches.com/search/label/search/label/Premier%20League",
        mode='ListowanieMeczy',
        icon=_resourcesPath + "pl.png",
        fanart=_default_background)
    addon.addDir("La Liga",
                 "http://www.replaymatches.com/search/label/La%20Liga",
                 mode='ListowanieMeczy',
                 icon=_resourcesPath + "laliga.png",
                 fanart=_default_background)
    addon.addDir("Serie A",
                 "http://www.replaymatches.com/search/label/Serie%20A",
                 mode='ListowanieMeczy',
                 icon=_resourcesPath + "seriea.png",
                 fanart=_default_background)
    addon.addDir("Bundesliga",
                 "http://www.replaymatches.com/search/label/Bundesliga",
                 mode='ListowanieMeczy',
                 icon=_resourcesPath + "bundesliga.png",
                 fanart=_default_background)
    addon.addDir("Ligue1",
                 "http://www.replaymatches.com/search/label/Ligue%201",
                 mode='ListowanieMeczy',
                 icon=_resourcesPath + "ligue1.png",
                 fanart=_default_background)
    addon.addDir("Champions League",
                 "http://www.replaymatches.com/search/label/UCL",
                 mode='ListowanieMeczy',
                 icon=_resourcesPath + "uefa.png",
                 fanart=_default_background)
    addon.addDir("Europa League",
                 "http://www.replaymatches.com/search/label/UEL",
                 mode='ListowanieMeczy',
                 icon=_resourcesPath + "europa.png",
                 fanart=_default_background)
コード例 #29
0
def CATEGORIES():
    addon.addDir("Szukaj", '', mode=1)
    addon.addDir("Kanaly", "", mode=21)
    addon.addDir("Kategorie", "", mode=20)
    addon.addDir("Polecane",
                 'http://www.filmydokumentalne.eu/polecane/',
                 mode=10)
    addon.addDir("Ranking",
                 'http://www.filmydokumentalne.eu/ranking/',
                 mode=10)
    addon.addDir("Najnowsze",
                 'http://www.filmydokumentalne.eu/najnowsze-filmy/',
                 mode=10)
コード例 #30
0
ファイル: main.py プロジェクト: po50on/cherry-dev
    for item in lista_odcinkow:
        if 'a href' in item and '?typ' not in item and not 'ul class' in item:
            lista.append(item)
    for item in lista:
        item2 = client.parseDOM(item, 'a')
        lista_tytulow.append(item2[0])
        item = client.parseDOM(item, 'a', ret='href')[0]
        lista_linkow.append(item)
    i = 1

    while i < len(lista_tytulow) + 1:
        url = 'https://strefadb.pl' + lista_linkow[i - 1]
        addon.addDir(
            str(i) + ' ' +
            str(lista_tytulow[i - 1]).replace('(', '| ocena odcinka: ('),
            url,
            mode='ListowanieLinkow',
            fanart=_resourcesPath + "kino_fanart.jpg")
        i += 1

###############################################

if mode == None or url == None or len(url) < 1:
    if xbmcplugin.getSetting(int(sys.argv[1]), 'user') == '':
        dialog = xbmcgui.Dialog()
        dialog.ok('Blad!', 'Wpisz dane do logowania w ustawieniach :)')
        sys.exit(0)
    else:
        headers = {
            'User-Agent':
            'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0'