cuenta1

menu_cine

Nov 14th, 2025
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 33.27 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <items>
  3. <item>
  4. <title>[COLOR red]•[/COLOR] [B][COLOR white]ELEMENTUM[/COLOR][COLOR none]     $doregex[elementum]  [/COLOR][/B]</title>
  5. <link>$doregex[install]</link>
  6. <thumbnail>https://i.imgur.com/d1ad1Is.png</thumbnail>
  7. <fanart>https://i.imgur.com/mAe2igo.jpg</fanart>
  8. <regex>
  9. <name>elementum</name>
  10. <expres><![CDATA[#$pyFunction#
  11. def GetLSProData(page_data, Cookie_Jar, m):
  12.    import xbmcvfs
  13.    import xbmcaddon
  14.    import xbmc
  15.    import os
  16.    import requests
  17.    from bs4 import BeautifulSoup
  18.  
  19.    HOME = xbmcvfs.translatePath('special://home/')
  20.    ADDONS = xbmcvfs.translatePath(os.path.join(HOME, 'addons'))
  21.    ELEMENTUM_ID = "plugin.video.elementum"
  22.    localPath = os.path.join(ADDONS, ELEMENTUM_ID)
  23.    remoteData = requests.get(
  24.        "https://raw.githubusercontent.com/elgatito/plugin.video.elementum/master/addon.xml").text
  25.    remoteSoup = BeautifulSoup(remoteData, "html5lib")
  26.  
  27.    if (localPath and xbmc.getCondVisibility('System.HasAddon(%s)' % ELEMENTUM_ID)):
  28.        localVersion = xbmcaddon.Addon(ELEMENTUM_ID).getAddonInfo("version")
  29.        remoteVersion = remoteSoup.find("addon").get("version")
  30.        from distutils.version import LooseVersion
  31.        if LooseVersion(remoteVersion) > LooseVersion(localVersion):
  32.            return "[COLOR orange]ACTUALIZACIÓN REQUERIDA[/COLOR]"
  33.        else:
  34.            return "[COLOR lime]INSTALADO[/COLOR]"
  35.  
  36.    return "[COLOR red]NO INSTALADO[/COLOR]"
  37.  
  38. ]]></expres>
  39. <page></page>
  40. </regex>
  41. <regex>
  42. <name>platforms</name>
  43. <expres><![CDATA[#$pyFunction
  44. def GetLSProData(page_data, Cookie_Jar, m):
  45.    import requests
  46.    import os
  47.    import xbmcvfs
  48.    import xbmcaddon
  49.    import xbmcgui
  50.    import platform as plt
  51.    from bs4 import BeautifulSoup
  52.  
  53.    ADDON = xbmcaddon.Addon()
  54.    ADDONTITLE = ADDON.getAddonInfo('name')
  55.    HOME = xbmcvfs.translatePath('special://home/')
  56.    ADDONS = os.path.join(HOME, 'addons')
  57.    PACKAGES = os.path.join(HOME, 'packages')
  58.  
  59.    ELEMENTUM_URL = "https://elementum.surge.sh/getting-started/platforms-page/"
  60.    platforms = dict()
  61.    names = list()
  62.    parentLinks = list()
  63.    system = plt.system()
  64.  
  65.    data = requests.get(ELEMENTUM_URL).text
  66.    soup = BeautifulSoup(data, "html5lib")
  67.    for item in soup.find_all("tr", {"class": "platform-os"}):
  68.        links = list()
  69.  
  70.        for link in item.find_all(
  71.                "div", {"class": "platform-asset"}):
  72.            links.append({link.text: link.find("a").get("href")})
  73.  
  74.        platforms[item.find(
  75.            "td", {"class": "platform-name"}).text.strip().replace("OSx", "Darwin")] = links
  76.  
  77.    for platform, structures in platforms.items():
  78.        for k, v in {key: value for dictionary in structures for key,
  79.                     value in dictionary.items()}.items():
  80.            if platform != system:
  81.                names.append(
  82.                    f"[COLOR red]{platform}[/COLOR] - [COLOR white]{k}[/COLOR]")
  83.            else:
  84.                names.append(
  85.                    f"[B][COLOR orange]{platform} - {k}[/COLOR][/B]")
  86.            parentLinks.append(v)
  87.    option = xbmcgui.Dialog().select("Selecciona tu plataforma", names)
  88.    if option == -1:
  89.        return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  90.    return str((parentLinks[option], names[option]))
  91.  
  92. ]]></expres>
  93. <page></page>
  94. </regex>
  95. <regex>
  96. <name>install</name>
  97. <expres><![CDATA[#$pyFunction
  98. def GetLSProData(page_data, Cookie_Jar, m):
  99.    import os
  100.    import xbmcvfs
  101.    import xbmcaddon
  102.    import xbmcgui
  103.    import zipfile
  104.    import time
  105.    import urllib.request
  106.    import xbmc
  107.    import re
  108.    import glob
  109.    from datetime import datetime
  110.    from sqlite3 import dbapi2 as database
  111.  
  112.    ADDON = xbmcaddon.Addon()
  113.    ADDONTITLE = ADDON.getAddonInfo('name')
  114.    HOME = xbmcvfs.translatePath('special://home/')
  115.    ADDONS = os.path.join(HOME, 'addons')
  116.    PACKAGES = os.path.join(ADDONS, 'packages')
  117.    DATABASE = xbmcvfs.translatePath('special://database/')
  118.  
  119.    def latest_db(db):
  120.        match = glob.glob(os.path.join(DATABASE, '{0}*.db'.format(db)))
  121.        comp = '{0}(.+?).db'.format(db[1:])
  122.        highest = 0
  123.        for file in match:
  124.            try:
  125.                check = int(re.compile(comp).findall(file)[0])
  126.            except:
  127.                check = 0
  128.            if highest < check:
  129.                highest = check
  130.        return '{0}{1}.db'.format(db, highest)
  131.  
  132.    def addon_database(addon=None, state=1, array=False):
  133.        dbfile = latest_db('Addons')
  134.        dbfile = os.path.join(DATABASE, dbfile)
  135.        installedtime = str(datetime.now())[:-7]
  136.  
  137.        if os.path.exists(dbfile):
  138.            try:
  139.                textdb = database.connect(dbfile)
  140.                textexe = textdb.cursor()
  141.            except Exception as e:
  142.                return False
  143.        else:
  144.            return False
  145.  
  146.        if state == 2:
  147.            try:
  148.                textexe.execute(
  149.                    "DELETE FROM installed WHERE addonID = ?", (addon,))
  150.                textdb.commit()
  151.                textexe.close()
  152.            except:
  153.                pass
  154.            return True
  155.  
  156.        try:
  157.            if not array:
  158.                textexe.execute(
  159.                    'INSERT or IGNORE into installed (addonID , enabled, installDate) VALUES (?,?,?)', (addon, state, installedtime,))
  160.                textexe.execute(
  161.                    'UPDATE installed SET enabled = ? WHERE addonID = ? ', (state, addon,))
  162.            else:
  163.                for item in addon:
  164.                    textexe.execute(
  165.                        'INSERT or IGNORE into installed (addonID , enabled, installDate) VALUES (?,?,?)', (item, state, installedtime,))
  166.                    textexe.execute(
  167.                        'UPDATE installed SET enabled = ? WHERE addonID = ? ', (state, item,))
  168.            textdb.commit()
  169.            textexe.close()
  170.        except Exception as e:
  171.            pass
  172.  
  173.    class Extracter(object):
  174.        def __init__(self, name, _in, _out):
  175.            dialog = xbmcgui.DialogProgress()
  176.            dialog.create(name, "")
  177.            self.all(_in, _out, dialog)
  178.  
  179.        def all(self, _in, _out, dp):
  180.  
  181.            zin = zipfile.ZipFile(_in,  'r')
  182.  
  183.            nFiles = float(len(zin.infolist()))
  184.            count = 0
  185.  
  186.            try:
  187.                for item in zin.infolist():
  188.                    count += 1
  189.                    update = count / nFiles * 100
  190.                    dp.update(int(update))
  191.                    zin.extract(item, _out)
  192.            except Exception as e:
  193.                return False
  194.  
  195.            return True
  196.  
  197.    class Downloader(object):
  198.        def __init__(self, url, name, dest) -> None:
  199.            self.URL = url
  200.            self.NAME = name
  201.            self.DEST = dest
  202.            self.start_time = time.time()
  203.  
  204.            dialog = xbmcgui.DialogProgress()
  205.            dialog.create(self.NAME, "")
  206.  
  207.            urllib.request.urlretrieve(
  208.                url, dest, lambda nb, bs, fs: self.downloadPercentage(nb, bs, fs, dialog, name))
  209.  
  210.        def downloadPercentage(self, nb, bs, fs, dialog, name):
  211.            messages = list()
  212.            try:
  213.                percent = min(nb * bs * 100 / fs, 100)
  214.                currently_downloaded = float(nb) * bs / (1024 * 1024)
  215.                kbps_speed = nb * bs / (time.time() - self.start_time)
  216.                if kbps_speed > 0:
  217.                    eta = (fs - nb * bs) / kbps_speed
  218.                else:
  219.                    eta = 0
  220.                kbps_speed = kbps_speed / 1024
  221.                total = float(fs) / (1024 * 1024)
  222.                messages.append(f'[B]Descargando {name}...[/B]')
  223.                messages.append('%.02f MB de %.02f MB' %
  224.                                (currently_downloaded, total))
  225.                messages.append('Velocidad: %.02f Kb/s ' % kbps_speed)
  226.                messages.append('Tiempo: %02d:%02d' % divmod(eta, 60))
  227.                dialog.update(int(percent), "\n".join(messages))
  228.            except Exception as _:
  229.                percent = 100
  230.                dialog.update(percent)
  231.                dialog.close()
  232.  
  233.            if dialog.iscanceled():
  234.                dialog.close()
  235.  
  236.    platforms = $doregex[platforms]
  237.    
  238.    dest = os.path.join(xbmcvfs.translatePath(PACKAGES),
  239.                        platforms[0].split('/')[-1])
  240.    Downloader(platforms[0], platforms[1], dest)
  241.    Extracter(platforms[1], dest, ADDONS)
  242.    addon_database("plugin.video.elementum", 1)
  243.  
  244.    xbmc.executebuiltin('UpdateAddonRepos()')
  245.    xbmc.executebuiltin('UpdateLocalAddons()')
  246.    xbmc.executebuiltin('Container.Refresh()')
  247.  
  248. ]]></expres>
  249. <page></page>
  250. </regex>
  251.  
  252. </item>
  253. <item>
  254.  Created by Someone Like You
  255. <title>[COLOR white]•[/COLOR] [B][COLOR red]BUSCADOR[/COLOR][/B]</title>
  256. <link>$doregex[results]</link>
  257. <regex>
  258. <name>results</name>
  259. <listrepeat><![CDATA[
  260. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  261. <link>$doregex[selectionLinks]</link>
  262. <year>[results.param4]</year>
  263. <genre>[results.param5]</genre>
  264. <info>[results.param6]</info>
  265. <thumbnail>[results.param2]</thumbnail>
  266. <fanart>[results.param3]</fanart>
  267. ]]></listrepeat>
  268. <expres><![CDATA[#$pyFunction
  269.  
  270. def GetLSProData(page_data, Cookie_Jar, m):
  271.    import xbmcgui
  272.    import requests
  273.    import re
  274.    import difflib
  275.    from bs4 import BeautifulSoup
  276.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  277.                  'date', 'genre', 'info', 'links']
  278.  
  279.    matches = list()
  280.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  281.    soup = BeautifulSoup(data, "html5lib")
  282.  
  283.    inputText = xbmcgui.Dialog().input(
  284.        'Buscar Pelicula: ', type=xbmcgui.INPUT_ALPHANUM).upper()
  285.  
  286.    for item in list(filter(lambda item: item.find('title') is not None, soup.find_all("item"))):
  287.        title = item.find('title').text.upper()
  288.        ratio = 100 if inputText in title.upper() else difflib.SequenceMatcher(
  289.            None, title, inputText).ratio() * 100
  290.        if ratio < 60:
  291.            continue
  292.        data = dict()
  293.        links = list()
  294.        for child in item.children:
  295.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  296.                links.append({child.name: child.text})
  297.            elif (child.name in VALID_TAGS):
  298.                data[child.name] = child.text
  299.  
  300.        if len(links) == 0:
  301.            continue
  302.        data['links'] = str(links)
  303.        matches.append(tuple(
  304.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  305.    return list(sorted(matches, key=lambda film: film[0]))
  306. ]]></expres>
  307. <page></page>
  308. </regex>
  309. <regex>
  310. <name>selectionLinks</name>
  311. <expres><![CDATA[#$pyFunction
  312. def GetLSProData(page_data, Cookie_Jar, m):
  313.    import xbmcgui
  314.    import xbmcaddon
  315.    ADDON = xbmcaddon.Addon()
  316.    dialog = xbmcgui.Dialog()
  317.    links = {key: value for dictionary in [results.param7] for key,
  318.             value in dictionary.items()}
  319.    option = 0
  320.    if len(links) > 1:
  321.        option = dialog.select('Seleccione Calidad:', [quality.replace('microhd', 'Micro HD').replace(
  322.            'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K') for quality in links.keys()])
  323.        if option == -1:
  324.            return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  325.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + list(links.values())[option]
  326.  
  327. ]]></expres>
  328. <page></page>
  329. </regex>
  330. <thumbnail>https://i.imgur.com/g412a9y.png</thumbnail>
  331. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  332. </item>
  333. <item>
  334. <title>[COLOR white]•[/COLOR] [B][COLOR red]TODAS[/COLOR][COLOR white]              (A-Z)[/COLOR][/B]</title>
  335. <link>$doregex[results]</link>
  336. <regex>
  337. <name>results</name>
  338. <listrepeat><![CDATA[
  339. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  340. <link>$doregex[selectionLinks]</link>
  341. <year>[results.param4]</year>
  342. <genre>[results.param5]</genre>
  343. <info>[results.param6]</info>
  344. <thumbnail>[results.param2]</thumbnail>
  345. <fanart>[results.param3]</fanart>
  346. ]]></listrepeat>
  347. <expres><![CDATA[#$pyFunction
  348. def GetLSProData(page_data, Cookie_Jar, m):
  349.    import requests
  350.    import re
  351.    from bs4 import BeautifulSoup
  352.    LENGTH_MAGNET = [32, 40]
  353.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  354.                  'date', 'genre', 'info', 'links']
  355.  
  356.    matches = list()
  357.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  358.    soup = BeautifulSoup(data, "html5lib")
  359.    for item in soup.find_all("item"):
  360.        data = dict()
  361.        links = list()
  362.        for child in item.children:
  363.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  364.                links.append({child.name: child.text})
  365.            elif (child.name in VALID_TAGS):
  366.                data[child.name] = child.text
  367.  
  368.        if len(links) == 0:
  369.            continue
  370.        data['links'] = str(links)
  371.        matches.append(tuple(
  372.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  373.    return list(sorted(matches, key=lambda film: film[0]))
  374. ]]></expres>
  375. <page></page>
  376. </regex>
  377. <regex>
  378. <name>selectionLinks</name>
  379. <expres><![CDATA[#$pyFunction
  380. def GetLSProData(page_data, Cookie_Jar, m):
  381.    import xbmcgui
  382.    import xbmcaddon
  383.    ADDON = xbmcaddon.Addon()
  384.    dialog = xbmcgui.Dialog()
  385.    links = {key: value for dictionary in [results.param7] for key,
  386.             value in dictionary.items()}
  387.    option = 0
  388.    if len(links) > 1:
  389.        option = dialog.select('Seleccione Calidad:', [quality.replace('microhd', 'Micro HD').replace(
  390.            'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K') for quality in links.keys()])
  391.        if option == -1:
  392.            return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  393.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + list(links.values())[option]
  394.  
  395. ]]></expres>
  396. <page></page>
  397. </regex>
  398. <thumbnail>https://i.imgur.com/f9tpAmE.png</thumbnail>
  399. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  400. </item>
  401.  
  402.  
  403. <item>
  404. <title>[COLOR white]•[/COLOR] [B][COLOR red]CALIDAD[/COLOR][COLOR white]          MICROHD, BDRIP, 3D, 4K[/COLOR][/B]</title>
  405. <thumbnail>https://i.imgur.com/3I3skgB.png</thumbnail>
  406. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  407. <link>$doregex[qualities]</link>
  408. <regex>
  409. <name>qualities</name>
  410. <listrepeat><![CDATA[
  411. <title>[COLOR red]•[/COLOR] [B][COLOR white][qualities.param2][/COLOR][/B]</title>
  412. <link>$doregex[results]</link>
  413. <thumbnail>https://i.imgur.com/3I3skgB.png</thumbnail>
  414. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  415. ]]></listrepeat>
  416. <expres><![CDATA[#$pyFunction
  417. def GetLSProData(page_data, Cookie_Jar, m):
  418.    import requests
  419.    import re
  420.    from bs4 import BeautifulSoup
  421.    qualities = list()
  422.  
  423.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  424.    soup = BeautifulSoup(data, "html5lib")
  425.    for item in soup.find_all("item"):
  426.        for child in item.children:
  427.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  428.                if child.name not in qualities:
  429.                    qualities.append(child.name)
  430.  
  431.    return list(sorted([(quality, quality.replace('microhd', 'Micro HD').replace(
  432.        'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K')) for quality in qualities], key=lambda quality: quality[1]))
  433.  
  434. ]]></expres>
  435. <page></page>
  436. </regex>
  437. <regex>
  438. <name>results</name>
  439. <listrepeat><![CDATA[
  440. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  441. <link>$doregex[selectionLinks]</link>
  442. <year>[results.param4]</year>
  443. <genre>[results.param5]</genre>
  444. <info>[results.param6]</info>
  445. <thumbnail>[results.param2]</thumbnail>
  446. <fanart>[results.param3]</fanart>
  447. ]]></listrepeat>
  448. <expres><![CDATA[#$pyFunction
  449. def GetLSProData(page_data, Cookie_Jar, m):
  450.    import requests
  451.    import re
  452.    from bs4 import BeautifulSoup
  453.    quality = "[qualities.param1]"
  454.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  455.                  'date', 'genre', 'info', 'links']
  456.  
  457.    matches = list()
  458.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  459.    soup = BeautifulSoup(data, "html5lib")
  460.    for item in list(filter(lambda it: it.find(quality) is not None and re.match(
  461.            r'^[0-9a-fA-F]{40}$', it.find(quality).text), soup.find_all("item"))):
  462.        data = dict()
  463.        links = list()
  464.        for child in item.children:
  465.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  466.                links.append({child.name: child.text})
  467.            elif (child.name in VALID_TAGS):
  468.                data[child.name] = child.text
  469.  
  470.        if len(links) == 0:
  471.            continue
  472.        data['links'] = str(links)
  473.        matches.append(tuple(
  474.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  475.    return list(sorted(matches, key=lambda film: film[0]))
  476.  
  477. ]]></expres>
  478. <page></page>
  479. </regex>
  480. <regex>
  481. <name>selectionLinks</name>
  482. <expres><![CDATA[#$pyFunction
  483. def GetLSProData(page_data, Cookie_Jar, m):
  484.    links = {key: value for dictionary in [results.param7] for key,
  485.             value in dictionary.items()}
  486.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + links.get("[qualities.param1]")
  487.  
  488. ]]></expres>
  489. <page></page>
  490. </regex>
  491. </item>
  492.  
  493.  
  494. <item>
  495. <title>[COLOR white]•[/COLOR] [B][COLOR red]AÑO[/COLOR][/B]</title>
  496. <thumbnail>https://i.imgur.com/eyTvbyC.png</thumbnail>
  497. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  498. <link>$doregex[years]</link>
  499. <regex>
  500. <name>years</name>
  501. <listrepeat><![CDATA[
  502. <title>[COLOR red]•[/COLOR] [B][COLOR white][years.param1][/COLOR][/B]</title>
  503. <link>$doregex[results]</link>
  504. <thumbnail>https://i.imgur.com/eyTvbyC.png</thumbnail>
  505. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  506. ]]></listrepeat>
  507. <expres><![CDATA[#$pyFunction
  508. def GetLSProData(page_data, Cookie_Jar, m):
  509.    import requests
  510.    import re
  511.    from bs4 import BeautifulSoup
  512.    years = list()
  513.  
  514.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  515.    soup = BeautifulSoup(data, "html5lib")
  516.    for item in soup.find_all("item"):
  517.        date = item.find('date')
  518.        if date is not None:
  519.            if item.find('date').text not in years:
  520.                years.append(item.find('date').text)
  521.    return list(sorted(years, reverse=True))
  522. ]]></expres>
  523. <page></page>
  524. </regex>
  525. <regex>
  526. <name>results</name>
  527. <listrepeat><![CDATA[
  528. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  529. <link>$doregex[selectionLinks]</link>
  530. <year>[results.param4]</year>
  531. <genre>[results.param5]</genre>
  532. <info>[results.param6]</info>
  533. <thumbnail>[results.param2]</thumbnail>
  534. <fanart>[results.param3]</fanart>
  535. ]]></listrepeat>
  536. <expres><![CDATA[#$pyFunction
  537. def GetLSProData(page_data, Cookie_Jar, m):
  538.    import requests
  539.    import re
  540.    from bs4 import BeautifulSoup
  541.    year = "[years.param1]"
  542.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  543.                  'date', 'genre', 'info', 'links']
  544.  
  545.    matches = list()
  546.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  547.    soup = BeautifulSoup(data, "html5lib")
  548.    for item in list(filter(lambda it: it.find("date") is not None and it.find("date").text == year, soup.find_all("item"))):
  549.        data = dict()
  550.        links = list()
  551.        for child in item.children:
  552.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  553.                links.append({child.name: child.text})
  554.            elif (child.name in VALID_TAGS):
  555.                data[child.name] = child.text
  556.  
  557.        if len(links) == 0:
  558.            continue
  559.        data['links'] = str(links)
  560.        matches.append(tuple(
  561.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  562.    return list(sorted(matches, key=lambda film: film[0]))
  563.  
  564. ]]></expres>
  565. <page></page>
  566. </regex>
  567. <regex>
  568. <name>selectionLinks</name>
  569. <expres><![CDATA[#$pyFunction
  570. def GetLSProData(page_data, Cookie_Jar, m):
  571.    import xbmcgui
  572.    import xbmcaddon
  573.    ADDON = xbmcaddon.Addon()
  574.    dialog = xbmcgui.Dialog()
  575.    links = {key: value for dictionary in [results.param7] for key,
  576.             value in dictionary.items()}
  577.    option = 0
  578.    if len(links) > 1:
  579.        option = dialog.select('Seleccione Calidad:', [quality.replace('microhd', 'Micro HD').replace(
  580.            'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K') for quality in links.keys()])
  581.        if option == -1:
  582.            return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  583.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + list(links.values())[option]
  584.  
  585. ]]></expres>
  586. <page></page>
  587. </regex>
  588. </item>
  589.  
  590.  
  591. <item>
  592. <title>[COLOR white]•[/COLOR] [B][COLOR red]GENERO[/COLOR][COLOR white]           ACCION, DRAMA, SAGAS, ...[/COLOR][/B]</title>
  593. <thumbnail>https://i.imgur.com/E2xELih.png</thumbnail>
  594. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  595. <link>$doregex[genres]</link>
  596. <regex>
  597. <name>genres</name>
  598. <listrepeat><![CDATA[
  599. <title>[COLOR red]•[/COLOR] [B][COLOR white][genres.param1][/COLOR][/B]</title>
  600. <link>$doregex[results]</link>
  601. <thumbnail>https://i.imgur.com/eyTvbyC.png</thumbnail>
  602. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  603. ]]></listrepeat>
  604. <expres><![CDATA[#$pyFunction
  605. def GetLSProData(page_data, Cookie_Jar, m):
  606.    import requests
  607.    import unicodedata
  608.    from bs4 import BeautifulSoup
  609.    genres = list()
  610.  
  611.    def strip_accents(s):
  612.        return ''.join(c for c in unicodedata.normalize('NFD', s)
  613.                       if unicodedata.category(c) != 'Mn')
  614.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  615.    soup = BeautifulSoup(strip_accents(data), "html5lib")
  616.    for item in soup.find_all("item"):
  617.        genreItem = item.find('genre')
  618.        if genreItem is not None:
  619.            for genre in [genre.strip() for genre in genreItem.text.split('.')]:
  620.                if not genre in genres:
  621.                    genres.append(genre)
  622.    return list(filter(lambda item: item and item != 'NA', sorted(genres)))
  623. ]]></expres>
  624. <page></page>
  625. </regex>
  626. <regex>
  627. <name>results</name>
  628. <listrepeat><![CDATA[
  629. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  630. <link>$doregex[selectionLinks]</link>
  631. <year>[results.param4]</year>
  632. <genre>[results.param5]</genre>
  633. <info>[results.param6]</info>
  634. <thumbnail>[results.param2]</thumbnail>
  635. <fanart>[results.param3]</fanart>
  636. ]]></listrepeat>
  637. <expres><![CDATA[#$pyFunction
  638. def GetLSProData(page_data, Cookie_Jar, m):
  639.    import requests
  640.    import re
  641.    from bs4 import BeautifulSoup
  642.    genre = "[genres.param1]"
  643.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  644.                  'date', 'genre', 'info', 'links']
  645.  
  646.    matches = list()
  647.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  648.    soup = BeautifulSoup(data, "html5lib")
  649.    for item in list(filter(lambda it: it.find("genre") is not None and genre in it.find("genre").text, soup.find_all("item"))):
  650.        data = dict()
  651.        links = list()
  652.        for child in item.children:
  653.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  654.                links.append({child.name: child.text})
  655.            elif (child.name in VALID_TAGS):
  656.                data[child.name] = child.text
  657.  
  658.        if len(links) == 0:
  659.            continue
  660.        data['links'] = str(links)
  661.        matches.append(tuple(
  662.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  663.    return list(sorted(matches, key=lambda film: film[0]))
  664. ]]></expres>
  665. <page></page>
  666. </regex>
  667. <regex>
  668. <name>selectionLinks</name>
  669. <expres><![CDATA[#$pyFunction
  670. def GetLSProData(page_data, Cookie_Jar, m):
  671.    import xbmcgui
  672.    import xbmcaddon
  673.    ADDON = xbmcaddon.Addon()
  674.    dialog = xbmcgui.Dialog()
  675.    links = {key: value for dictionary in [results.param7] for key,
  676.             value in dictionary.items()}
  677.    option = 0
  678.    if len(links) > 1:
  679.        option = dialog.select('Seleccione Calidad:', [quality.replace('microhd', 'Micro HD').replace(
  680.            'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K') for quality in links.keys()])
  681.        if option == -1:
  682.            return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  683.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + list(links.values())[option]
  684.  
  685. ]]></expres>
  686. <page></page>
  687. </regex>
  688. </item>
  689.  
  690. <item>
  691. <title>[COLOR white]•[/COLOR] [B][COLOR red]CINE DE[/COLOR]    [COLOR white]        CULTO[/COLOR][/B]</title>
  692. <thumbnail>https://i.imgur.com/Hmc87sC.png</thumbnail>
  693. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  694. <link>$doregex[results]</link>
  695. <regex>
  696. <name>results</name>
  697. <listrepeat><![CDATA[
  698. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  699. <link>$doregex[selectionLinks]</link>
  700. <year>[results.param4]</year>
  701. <genre>[results.param5]</genre>
  702. <info>[results.param6]</info>
  703. <thumbnail>[results.param2]</thumbnail>
  704. <fanart>[results.param3]</fanart>
  705. ]]></listrepeat>
  706. <expres><![CDATA[#$pyFunction
  707. def GetLSProData(page_data, Cookie_Jar, m):
  708.    import requests
  709.    import re
  710.    from bs4 import BeautifulSoup
  711.    extra = "Culto"
  712.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  713.                  'date', 'genre', 'info', 'links']
  714.  
  715.    matches = list()
  716.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  717.    soup = BeautifulSoup(data, "html5lib")
  718.    for item in list(filter(lambda it: it.find("extra") is not None and it.find("extra").text == extra, soup.find_all("item"))):
  719.        data = dict()
  720.        links = list()
  721.        for child in item.children:
  722.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  723.                links.append({child.name: child.text})
  724.            elif (child.name in VALID_TAGS):
  725.                data[child.name] = child.text
  726.  
  727.        if len(links) == 0:
  728.            continue
  729.        data['links'] = str(links)
  730.        matches.append(tuple(
  731.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  732.    return list(sorted(matches, key=lambda film: film[0]))
  733.  
  734. ]]></expres>
  735. <page></page>
  736. </regex>
  737. <regex>
  738. <name>selectionLinks</name>
  739. <expres><![CDATA[#$pyFunction
  740. def GetLSProData(page_data, Cookie_Jar, m):
  741.    import xbmcgui
  742.    import xbmcaddon
  743.    ADDON = xbmcaddon.Addon()
  744.    dialog = xbmcgui.Dialog()
  745.    links = {key: value for dictionary in [results.param7] for key,
  746.             value in dictionary.items()}
  747.    option = 0
  748.    if len(links) > 1:
  749.        option = dialog.select('Seleccione Calidad:', [quality.replace('microhd', 'Micro HD').replace(
  750.            'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K') for quality in links.keys()])
  751.        if option == -1:
  752.            return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  753.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + list(links.values())[option]
  754.  
  755. ]]></expres>
  756. <page></page>
  757. </regex>
  758. </item>
  759. <item>
  760. <title>[COLOR white]•[/COLOR] [B][COLOR red]CINE DE[/COLOR]    [COLOR white]        ESTRENO[/COLOR][/B]</title>
  761. <thumbnail>https://i.imgur.com/vX0Ycn6.png</thumbnail>
  762. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  763. <link>$doregex[results]</link>
  764. <regex>
  765. <name>results</name>
  766. <listrepeat><![CDATA[
  767. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  768. <link>$doregex[selectionLinks]</link>
  769. <year>[results.param4]</year>
  770. <genre>[results.param5]</genre>
  771. <info>[results.param6]</info>
  772. <thumbnail>[results.param2]</thumbnail>
  773. <fanart>[results.param3]</fanart>
  774. ]]></listrepeat>
  775. <expres><![CDATA[#$pyFunction
  776. def GetLSProData(page_data, Cookie_Jar, m):
  777.    import requests
  778.    import re
  779.    from bs4 import BeautifulSoup
  780.    extra = "Estreno"
  781.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  782.                  'date', 'genre', 'info', 'links']
  783.  
  784.    matches = list()
  785.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  786.    soup = BeautifulSoup(data, "html5lib")
  787.    for item in list(filter(lambda it: it.find("extra") is not None and it.find("extra").text == extra, soup.find_all("item"))):
  788.        data = dict()
  789.        links = list()
  790.        for child in item.children:
  791.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  792.                links.append({child.name: child.text})
  793.            elif (child.name in VALID_TAGS):
  794.                data[child.name] = child.text
  795.  
  796.        if len(links) == 0:
  797.            continue
  798.        data['links'] = str(links)
  799.        matches.append(tuple(
  800.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  801.    return list(sorted(matches, key=lambda film: film[0]))
  802.  
  803. ]]></expres>
  804. <page></page>
  805. </regex>
  806. <regex>
  807. <name>selectionLinks</name>
  808. <expres><![CDATA[#$pyFunction
  809. def GetLSProData(page_data, Cookie_Jar, m):
  810.    import xbmcgui
  811.    import xbmcaddon
  812.    ADDON = xbmcaddon.Addon()
  813.    dialog = xbmcgui.Dialog()
  814.    links = {key: value for dictionary in [results.param7] for key,
  815.             value in dictionary.items()}
  816.    option = 0
  817.    if len(links) > 1:
  818.        option = dialog.select('Seleccione Calidad:', [quality.replace('microhd', 'Micro HD').replace(
  819.            'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K') for quality in links.keys()])
  820.        if option == -1:
  821.            return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  822.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + list(links.values())[option]
  823.  
  824. ]]></expres>
  825. <page></page>
  826. </regex>
  827. </item>
  828.  
  829. <item>
  830. <title>[COLOR white]•[/COLOR] [B][COLOR red]CINE DE[/COLOR]    [COLOR white]        MISCELANEA[/COLOR][/B]</title>
  831. <thumbnail>https://i.imgur.com/vIX7Cnq.png</thumbnail>
  832. <fanart>https://i.imgur.com/R7oMOZO.jpg</fanart>
  833. <link>$doregex[results]</link>
  834. <regex>
  835. <name>results</name>
  836. <listrepeat><![CDATA[
  837. <title>[COLOR red]•[/COLOR] [B][COLOR white][results.param1][/COLOR][/B]</title>
  838. <link>$doregex[selectionLinks]</link>
  839. <year>[results.param4]</year>
  840. <genre>[results.param5]</genre>
  841. <info>[results.param6]</info>
  842. <thumbnail>[results.param2]</thumbnail>
  843. <fanart>[results.param3]</fanart>
  844. ]]></listrepeat>
  845. <expres><![CDATA[#$pyFunction
  846. def GetLSProData(page_data, Cookie_Jar, m):
  847.    import requests
  848.    import re
  849.    from bs4 import BeautifulSoup
  850.    extra = "Mis"
  851.    VALID_TAGS = ['title', 'thumbnail', 'fanart',
  852.                  'date', 'genre', 'info', 'links']
  853.  
  854.    matches = list()
  855.    data = makeRequest('https://raw.githubusercontent.com/830NY/tacones_publico/main/cine.xml$$KonectasEncKey=Tacones$$')
  856.    soup = BeautifulSoup(data, "html5lib")
  857.    for item in list(filter(lambda it: it.find("extra") is not None and it.find("extra").text == extra, soup.find_all("item"))):
  858.        data = dict()
  859.        links = list()
  860.        for child in item.children:
  861.            if (child.name is not None and re.match(r'^[0-9a-fA-F]{40}$', child.text)):
  862.                links.append({child.name: child.text})
  863.            elif (child.name in VALID_TAGS):
  864.                data[child.name] = child.text
  865.  
  866.        if len(links) == 0:
  867.            continue
  868.        data['links'] = str(links)
  869.        matches.append(tuple(
  870.            dict(sorted(data.items(), key=lambda x: VALID_TAGS.index(x[0]))).values()))
  871.    return list(sorted(matches, key=lambda film: film[0]))
  872.  
  873. ]]></expres>
  874. <page></page>
  875. </regex>
  876. <regex>
  877. <name>selectionLinks</name>
  878. <expres><![CDATA[#$pyFunction
  879. def GetLSProData(page_data, Cookie_Jar, m):
  880.    import xbmcgui
  881.    import xbmcaddon
  882.    ADDON = xbmcaddon.Addon()
  883.    dialog = xbmcgui.Dialog()
  884.    links = {key: value for dictionary in [results.param7] for key,
  885.             value in dictionary.items()}
  886.    option = 0
  887.    if len(links) > 1:
  888.        option = dialog.select('Seleccione Calidad:', [quality.replace('microhd', 'Micro HD').replace(
  889.            'fullhd', 'Full HD').replace('tresd', '3D').replace('cuatrok', '4K') for quality in links.keys()])
  890.        if option == -1:
  891.            return xbmcgui.Dialog().notification(ADDON.getAddonInfo('name'), "Selección cancelada", ADDON.getAddonInfo('icon'))
  892.    return 'plugin://plugin.video.elementum/play?uri=magnet:?xt=urn:btih:' + list(links.values())[option]
  893.  
  894. ]]></expres>
  895. <page></page>
  896. </regex>
  897. </item>
  898. </items>
  899.  
  900.  
Advertisement
Add Comment
Please, Sign In to add comment