def open_table():
    pins = "PLugincreature"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        at = Airtable('app4PveOBVgpWLL17',
                      'OTB Creature Feature',
                      api_key='keyikW1exArRfNAWj')
        match = at.search('type', 'type', view='Grid view')
        for field in match:
            try:
                res = field['fields']
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<creature>type/%s</creature>"\
                       "</item>" % (name,res['thumbnail'],res['fanart'],name)
            except:
                pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 2
0
def open_list():
    pins = "PLuginotbtrekkiemain"
    Items = fetch_from_db2(pins)
    if Items: 
        display_data(Items) 
    else:
        xml = ""
        at = Airtable('appRSOovERyPqtopl', 'otb_trekkie', api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=1200, view='Grid view') 
        for field in match:
            try:
                res = field['fields']   
                name = res['Name']
                name = remove_non_ascii(name)
                summary = res['summary']
                summary = remove_non_ascii(summary)                                                 
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<trekkie>open|%s</trekkie>"\
                       "</item>" % (name,res['thumbnail'],res['fanart'],summary,res['link1'])
            except:
                pass                                                                     
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 3
0
def open_table(url):
    pins = "PLuginotbmusic" + url
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        table = url.split("|")[-2]
        key = url.split("|")[-1]
        at = Airtable(key, table, api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=1200, view='Grid view')
        for field in match:
            try:
                res = field['fields']
                name = res['Name']
                name = remove_non_ascii(name)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link = res['link']
                xml +=  "<item>"\
                        "<title>%s</title>"\
                        "<thumbnail>%s</thumbnail>"\
                        "<fanart>%s</fanart>"\
                        "<link>"\
                        "<otb_music>cat|%s|%s</otb_music>"\
                        "</link>"\
                        "</item>" % (name,thumbnail,fanart,name,link)

            except:
                pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 4
0
def open_table():
    pins = "PLuginotbmusic"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        at = Airtable('appBCuGEj4xJ9zmMs',
                      'music_genre',
                      api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=1200, view='Grid view')
        for field in match:
            try:
                res = field['fields']
                name = res['Name']
                name = remove_non_ascii(name)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link = res['link']
                summary = res['Summary']
                xml +=  "<item>"\
                        "<title>%s</title>"\
                        "<thumbnail>%s</thumbnail>"\
                        "<fanart>%s</fanart>"\
                        "<summary>%s</summary>"\
                        "<link>"\
                        "<otb_music>genre|%s</otb_music>"\
                        "</link>"\
                        "</item>" % (name,thumbnail,fanart,summary,link)

            except:
                pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 5
0
def get_channels2(url):
    pins = "PLuginairtablechannels2"
    Items = fetch_from_db2(pins)
    if Items: 
        display_data(Items) 
    else:    
        xml = ""
        at = Airtable('appycq5PhSS0tygok', 'TV_channels2', api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=700, sort=['channel'])
        for field in match:
            try:
                res = field['fields']
                channel = res['channel']
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link = res['link']                  
                xml +=  "<item>"\
                        "<title>%s</title>"\
                        "<meta>"\
                        "<content>movie</content>"\
                        "<imdb></imdb>"\
                        "<title>%s</title>"\
                        "<year></year>"\
                        "<thumbnail>%s</thumbnail>"\
                        "<fanart>%s</fanart>"\
                        "<summary></summary>"\
                        "</meta>"\
                        "<link>"\
                        "<sublink>%s</sublink>"\
                        "</link>"\
                        "</item>" % (channel,channel,thumbnail,fanart,link)
            except:
                pass                
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 6
0
def twenty_four_seven():    
    pins = "PLuginairtable247"
    Items = fetch_from_db2(pins)
    if Items: 
        display_data(Items) 
    else:    
        xml = ""
        table_key = 'appMiehwc18Akz8Zv'
        table_name = 'twenty_four_seven'
        at = Airtable(table_key, table_name, api_key='keyikW1exArRfNAWj')
        match = at.search('category', 'type' ,view='Grid view')
        for field in match:
            try:
                res = field['fields']
                channel = res['channel']
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link = res['link']
                link2 = res['link2']
                link3 = res['link3']
                category = res['category']
                xml +=  "<item>"\
                        "<title>%s</title>"\
                        "<thumbnail>%s</thumbnail>"\
                        "<fanart>%s</fanart>"\
                        "<link>"\
                        "<Airtable>cats/%s/%s/%s</Airtable>"\
                        "</link>"\
                        "</item>" % (channel,thumbnail,fanart,table_key,table_name,channel)

            except:
                pass                
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)        
Ejemplo n.º 7
0
def get_stream(url):
    pins = "PLugincobpall"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    xml = ""
    try:
        url = "https://collectionofbestporn.com/channels/"
        headers = {'User_Agent': User_Agent}
        html = requests.get(url, headers=headers).content
        block = re.compile('<h2>Categories</h2>(.+?)<footer>',
                           re.DOTALL).findall(html)
        match = re.compile(
            '<div class="video-thumb">.+?<a href="(.+?)".+?<img src="(.+?)".+?title="(.+?)"',
            re.DOTALL).findall(str(block))
        for link, image, name in match:
            xml += "<dir>"\
                   "    <title>%s</title>"\
                   "    <thumbnail>%s</thumbnail>"\
                   "    <cobp>category/%s</cobp>"\
                   "    <summary></summary>"\
                   "</dir>" % (name,image,name)
    except:
        pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 8
0
def get_shows2(url):
    pins = "PLuginarconaitvtwoshows"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        try:
            url = "https://www.arconaitv.us/"
            headers = {'User_Agent': User_Agent}
            html = requests.get(url, headers=headers).content
            block1 = re.compile(
                '<div class="stream-nav shows" id="shows">(.+?)<div class="acontainer">',
                re.DOTALL).findall(html)
            match1 = re.compile('href=(.+?) title=(.+?)>',
                                re.DOTALL).findall(str(block1))
            for link1, title1 in match1:
                title1 = title1.replace("\\'", "")
                title1 = remove_non_ascii(title1)
                link1 = link1.replace("\\'", "")
                link1 = "plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url=https://www.arconaitv.us/" + link1
                image1 = get_thumb(title1, html)
                if not MYCOLOR == "":
                    myTitle = "[COLOR %s]%s[/COLOR]" % (MYCOLOR, title1)
                else:
                    myTitle = title1
                if image1:
                    xml += "<plugin>"\
                           "<title>%s</title>"\
                           "<link>"\
                           "<sublink>%s</sublink>"\
                           "</link>"\
                           "<thumbnail>%s</thumbnail>"\
                           "<fanart>https://lerablog.org/wp-content/uploads/2014/05/tv-series.jpg</fanart>"\
                           "<summary>Random Episodes</summary>"\
                           "</plugin>" % (myTitle,link1,image1)
                elif not image1:
                    if title1 == "Simpsons S13+":
                        image2 = "http://icons.iconarchive.com/icons/nellanel/simpsons-folder/512/The-Simpsons-Season-13-icon.png"
                    elif title1 == "Two and Half Men":
                        image2 = "https://3.bp.blogspot.com/-JB2VNEAxvYo/W8c2odcMKkI/AAAAAAAACZk/m-lkHFcX--o1jPi4apM2kr73-ZNs5xswgCLcBGAs/s1600/dvd-two-and-a-half-men-dois-homens-e-meio-dublado-legendado-D_NQ_NP_743462-MLB27990032904_082018-F.jpg"
                    else:
                        image2 = get_other(title1, html)
                    xml += "<plugin>"\
                           "<title>%s</title>"\
                           "<link>"\
                           "<sublink>%s</sublink>"\
                           "</link>"\
                           "<thumbnail>%s</thumbnail>"\
                           "<fanart>https://lerablog.org/wp-content/uploads/2014/05/tv-series.jpg</fanart>"\
                           "<summary>Random Episodes</summary>"\
                           "</plugin>" % (myTitle,link1,image2)
        except Exception:
            failure = traceback.format_exc()
            xbmcgui.Dialog().textviewer('Exception', str(failure))
            pass
        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 9
0
def open_action_movies(url):
    pins = "PLuginbml" + url
    Items = fetch_from_db2(pins)
    print "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
    if Items:
        display_data(Items)
    else:
        xml = ""
        genre = url.split("/")[-1]
        at = Airtable('app4e5SF0cVMFFfIk',
                      'Imported_table',
                      api_key='keyikW1exArRfNAWj')
        try:
            match = at.search('type', genre, sort=['name'])
            for field in match:
                res = field['fields']
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']
                link_e = res['link_e']
                xml += display_xml(name, trailer, summary, thumbnail, fanart,
                                   link_a, link_b, link_c, link_d, link_e)
        except:
            pass
        at2 = Airtable('appPdiS6ARoPTl0XH',
                       'Imported_table',
                       api_key='keyikW1exArRfNAWj')
        try:
            match2 = at2.search('type', genre, sort=['name'])
            for field2 in match2:
                res = field2['fields']
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']
                link_e = res['link_e']
                xml += display_xml(name, trailer, summary, thumbnail, fanart,
                                   link_a, link_b, link_c, link_d, link_e)
        except:
            pass
        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 10
0
def open_movie_meta_movies(url):
    pins = "PLuginbmlopenmeta"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        at = Airtable('app4e5SF0cVMFFfIk',
                      'Imported_table',
                      api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=1200, sort=['name'])
        for field in match:
            try:
                res = field['fields']
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']
                link_e = res['link_e']
                xml += display_xml(name, trailer, summary, thumbnail, fanart,
                                   link_a, link_b, link_c, link_d, link_e)
            except:
                pass
        at2 = Airtable('appPdiS6ARoPTl0XH',
                       'Imported_table',
                       api_key='keyikW1exArRfNAWj')
        match2 = at2.get_all(maxRecords=1200, sort=['name'])
        for field2 in match2:
            try:
                res = field2['fields']
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']
                link_e = res['link_e']
                xml += display_xml(name, trailer, summary, thumbnail, fanart,
                                   link_a, link_b, link_c, link_d, link_e)
            except:
                pass
        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 11
0
def open_selected_show(url):
    title = url.split("|")[-2]
    pins = "PLuginotbtvshowshow" + title
    Items = fetch_from_db2(pins)
    if Items: 
        display_data(Items) 
    else:
        lai = []
        at1 = Airtable(tid, tnm, api_key=atk)
        m1 = at1.get_all(maxRecords=1200, view='Grid view') 
        for f1 in m1:
            r1 = f1['fields']   
            n1 = r1['au1']
            lai.append(n1)
        if yai in lai:
            pass
        else:
            exit()      
        xml = ""
        title = url.split("|")[-2]
        key = url.split("|")[-1]
        result = title+"_season"
        at = Airtable(key, title, api_key='keyu3sl4tsBzw02pw')
        match = at.search('category', result,view='Grid view')
        for field in match:
            try:
                res = field['fields']
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                summary = res['summary']
                if not summary:
                    summary = ""
                else:
                    summary = remove_non_ascii(summary)                  
                name = res['name']
                name = remove_non_ascii(name)
                url2 = title+"|"+key+"|"+name                                               
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<otb_tv>season|%s</otb_tv>"\
                       "</item>" % (name,thumbnail,fanart,summary,url2)                  
            except:
                pass                  
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)                       
Ejemplo n.º 12
0
def get_stream(url):
    cat = url.split("/")[-1]
    pins = "PLugincobp" + cat
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    xml = ""
    try:
        url = urlparse.urljoin('http://collectionofbestporn.com/', url)
        headers = {'User_Agent': User_Agent}
        html = requests.get(url, headers=headers).content
        vid_divs = dom_parser.parseDOM(
            html,
            'div',
            attrs={'class': 'video-item col-sm-5 col-md-4 col-xs-10'})
        count = 0
        for vid_section in vid_divs:
            thumb_div = dom_parser.parseDOM(vid_section,
                                            'div',
                                            attrs={'class': 'video-thumb'})[0]
            thumbnail = re.compile('<img src="(.+?)"',
                                   re.DOTALL).findall(str(thumb_div))[0]
            vid_page_url = re.compile('href="(.+?)"',
                                      re.DOTALL).findall(str(thumb_div))[0]

            title_div = dom_parser.parseDOM(vid_section,
                                            'div',
                                            attrs={'class': 'title'})[0]
            title = remove_non_ascii(
                re.compile('title="(.+?)"',
                           re.DOTALL).findall(str(title_div))[0])
            count += 1

            xml += "<item>"\
                   "    <title>%s</title>"\
                   "    <thumbnail>%s</thumbnail>"\
                   "    <cobp>%s</cobp>"\
                   "    <summary>%s</summary>"\
                   "</item>" % (title,thumbnail,vid_page_url, title)

            if count == 24:
                pagination = dom_parser.parseDOM(html,
                                                 'li',
                                                 attrs={'class': 'next'})[0]
                next_page = dom_parser.parseDOM(pagination, 'a', ret='href')[0]
                xml += "<dir>"\
                       "    <title>Next Page</title>"\
                       "    <thumbnail>%s</thumbnail>"\
                       "    <cobp>%s</cobp>"\
                       "</dir>" % (addon_icon,next_page)
    except:
        pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 13
0
def get_game(url):
    xml = ""
    current = url.split("/")[-1]
    pins = "PLuginmetacritictvshow" + current
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        try:
            url = "https://www.metacritic.com/browse/tv-shows/trailers/date?page=" + current
            r = scraper.get(url).content
            m = re.compile(
                '<h3 class="trailer_title">.+?<a href="(.+?)".+?<img src="(.+?)".+?alt="(.+?)"',
                re.DOTALL).findall(r)
            for oglink, image, name in m:
                f = oglink.split("trailers/")[0]
                p = oglink.split("/")[-1]
                link = base_link + f + "season-1/trailers/" + p
                name = remove_non_ascii(name)
                name = clean_search(name)
                name = name.encode('utf8')
                t = scraper.get(link).content
                n = re.compile('<span itemprop="description">(.+?)</span>',
                               re.DOTALL).findall(t)
                summary = n[0]
                summary = clean_search(summary)
                summary = remove_non_ascii(summary)
                summary = summary.encode('utf8')
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<metacritic>link**%s**%s**%s</metacritic>"\
                       "</item>" % (name,image,image,summary,link,name,image)
        except:
            pass
        next_page = int(current) + 1
        xml += "<item>"\
               "<title>[COLOR dodgerblue]Next Page >>[/COLOR]</title>"\
               "<metacritic>tvshow/%s</metacritic>"\
               "<thumbnail>http://www.clker.com/cliparts/a/f/2/d/1298026466992020846arrow-hi.png</thumbnail>"\
               "</item>" % (next_page)

    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 14
0
def tv_shows(html):
    pins = "PLuginarconaitvshows"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        try:
            block = re.compile(
                '<div class="stream-nav shows" id="shows">(.+?)<div class="acontainer">',
                re.DOTALL).findall(html)
            match = re.compile('href=(.+?) title=(.+?)>',
                               re.DOTALL).findall(str(block))
            xml += "<item>"\
                   "<title>[COLOR blue][B]----TV SHOWS----[/B][/COLOR]</title>"\
                   "<thumbnail>http://iconbug.com/data/2b/256/c6cbe045e598958b1efacc78b4127205.png</thumbnail>"\
                   "<fanart>https://lerablog.org/wp-content/uploads/2014/05/tv-series.jpg</fanart>"\
                   "<link></link>"\
                   "</item>"
            for link, name in match:
                name = name.replace("\\'", "")
                name = remove_non_ascii(name)
                link = link.replace("\\'", "")
                link = "plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url=https://www.arconaitv.us/" + link
                image2 = get_thumb(name, html)
                if image2:
                    xml += "<plugin>"\
                           "<title>%s</title>"\
                           "<link>"\
                           "<sublink>%s</sublink>"\
                           "</link>"\
                           "<thumbnail>%s</thumbnail>"\
                           "<fanart>https://lerablog.org/wp-content/uploads/2014/05/tv-series.jpg</fanart>"\
                           "<summary>Random Episodes</summary>"\
                           "</plugin>" % (name,link,image2)
                elif not image2:
                    image3 = get_other(name, html)
                    xml += "<plugin>"\
                           "<title>%s</title>"\
                           "<link>"\
                           "<sublink>%s</sublink>"\
                           "</link>"\
                           "<thumbnail>%s</thumbnail>"\
                           "<fanart>https://lerablog.org/wp-content/uploads/2014/05/tv-series.jpg</fanart>"\
                           "<summary>Random Episodes</summary>"\
                           "</plugin>" % (name,link,image3)
        except:
            pass
        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 15
0
def get_season(url):
    pins = "PLugintvmazeseason" + url
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        sea_num = url.split("/")[-1]
        sea_num = str(sea_num)
        tmdb_id = url.split("/")[-2]
        tvdb = url.split("/")[-3]
        imdb = url.split("/")[-4]
        fanart = url.split("/")[-5]
        tv_title = url.split("/")[-6]
        year = url.split("/")[-7]
        tmdb_fanart = "https://image.tmdb.org/t/p/original/" + str(fanart)
        html = "https://api.themoviedb.org/3/tv/%s/season/%s?api_key=%s&language=en-US" % (
            tmdb_id, sea_num, TMDB_api_key)
        html2 = requests.get(html).json()
        eps = html2['episodes']
        for episodes in eps:
            epi_num = episodes['episode_number']
            thumb = episodes['still_path']
            thumb = "https://image.tmdb.org/t/p/original" + str(thumb)
            title = episodes['name']
            title = remove_non_ascii(title)
            premiered = episodes['air_date']
            xml += "<item>"\
                  "<title>%s</title>"\
                  "<meta>"\
                  "<imdb>%s</imdb>"\
                  "<tvdb>%s</tvdb>"\
                  "<content>episode</content>"\
                  "<tvshowtitle>%s</tvshowtitle>"\
                  "<year>%s</year>"\
                  "<title>%s</title>"\
                  "<premiered>%s</premiered>"\
                  "<season>%s</season>"\
                  "<episode>%s</episode>"\
                  "</meta>"\
                  "<link>"\
                  "<sublink>search</sublink>"\
                  "<sublink>searchsd</sublink>"\
                  "</link>"\
                  "<thumbnail>%s</thumbnail>"\
                  "<fanart>%s</fanart>"\
                  "</item>" % (title, imdb, tvdb, tv_title, year, title, premiered, sea_num, epi_num, thumb, tmdb_fanart)

    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
def open_genre_meta_movies(url):
    xml = ""
    pins = "PLuginbmlmeta"+url
    Items = fetch_from_db2(pins)
    if Items: 
        display_data(Items) 
    else:     
        genre = url.split("/")[-1]
        at = Airtable('app1aK3wfaR0xDxSK', 'OTB Big Movie List', api_key='keyikW1exArRfNAWj')
        try:
            match = at.search('type', genre)
            for field in match:
                res = field['fields']   
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']
                link_e = res['link_e']
                xml += display_xml(name,trailer,summary,thumbnail,fanart,link_a,link_b,link_c,link_d,link_e)                  
        except:
            pass
        at2 = Airtable('appaVv9EN3EJnvUz4', 'OTB Big Movie List 2', api_key='keyikW1exArRfNAWj')
        try:
            match2 = at2.search('type', genre)
            for field2 in match2:
                res = field2['fields']   
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']
                link_e = res['link_e']
                xml += display_xml(name,trailer,summary,thumbnail,fanart,link_a,link_b,link_c,link_d,link_e)                   
        except:
            pass                          
        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 17
0
def open_genre_movies(url):
    pins = "PLuginmysterytheatre" + url
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        genre = url.split("/")[-1]
        at = Airtable(table_id, table_name, api_key=workspace_api_key)
        try:
            match = at.search('type', genre)
            for field in match:
                res = field['fields']
                name = res['name']
                name = remove_non_ascii(name)
                summary = res['summary']
                summary = remove_non_ascii(summary)
                fanart = res['fanart']
                thumbnail = res['thumbnail']
                link1 = res['link1']
                link2 = res['link2']
                link3 = res['link3']
                link4 = res['link4']
                link5 = res['link5']
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<link>"\
                       "<sublink>%s(Link 1)</sublink>"\
                       "<sublink>%s(Link 2)</sublink>"\
                       "<sublink>%s(Link 3)</sublink>"\
                       "<sublink>%s(Link 4)</sublink>"\
                       "<sublink>%s(Link 5)</sublink>"\
                       "<sublink>(Trailer)</sublink>"\
                       "</link>"\
                       "</item>" % (name,thumbnail,fanart,summary,link1,link2,link3,link4,link5)
        except:
            pass

        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
def open_movies():
    xml = ""
    pins = "PLuginbmlopen"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)  
    else:    
        at = Airtable('app1aK3wfaR0xDxSK', 'OTB Big Movie List', api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=1200, sort=['name'])
        for field in match:
            try:
                res = field['fields']   
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']  
                link_e = res['link_e']
                xml += display_xml(name,trailer,summary,thumbnail,fanart,link_a,link_b,link_c,link_d,link_e)                    
            except:
                pass    
        at2 = Airtable('appaVv9EN3EJnvUz4', 'OTB Big Movie List 2', api_key='keyikW1exArRfNAWj')
        match2 = at2.get_all(maxRecords=1200, sort=['name'])      
        for field2 in match2:
            try:
                res = field2['fields']   
                name = res['name']
                name = remove_non_ascii(name)
                trailer = res['trailer']
                summary = res['summary']
                summary = remove_non_ascii(summary)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link_a = res['link_a']
                link_b = res['link_b']
                link_c = res['link_c']
                link_d = res['link_d']
                link_e = res['link_e']
                xml += display_xml(name,trailer,summary,thumbnail,fanart,link_a,link_b,link_c,link_d,link_e)      
            except:
                pass                                                                                 
        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 19
0
def open_otb_tv_shows():
    pins = "PLuginotbtvshowmain"
    Items = fetch_from_db2(pins)
    if Items: 
        display_data(Items) 
    else:
        lai = []
        at1 = Airtable(tid, tnm, api_key=atk)
        m1 = at1.get_all(maxRecords=1200, view='Grid view') 
        for f1 in m1:
            r1 = f1['fields']   
            n1 = r1['au1']
            lai.append(n1)
        if yai in lai:
            pass
        else:
            exit()        
        xml = ""
        at = Airtable('app3KuBa2sTixDhTG', 'OTB TV Shows', api_key='keyu3sl4tsBzw02pw')
        match = at.get_all(maxRecords=700, sort=['name'])
        for field in match:
            try:
                res = field['fields']
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                summary = res['summary']
                if not summary:
                    summary = ""
                else:
                    summary = remove_non_ascii(summary)                        
                name = res['name']
                name = remove_non_ascii(name)                                                
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<otb_tv>show|%s</otb_tv>"\
                       "</item>" % (name,thumbnail,fanart,summary,res['link1'])
            except:
                pass                                                                     
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 20
0
def open_items(url):
    pins = "PLuginotbtrekkieseason"+url
    Items = fetch_from_db2(pins)
    if Items: 
        display_data(Items) 
    else:    
        xml = ""
        title = url.split("|")[-3]
        key = url.split("|")[-2]
        sea_name = url.split("|")[-1]
        result = title+"_"+sea_name
        at = Airtable(key, title, api_key='keyikW1exArRfNAWj')
        match = at.search('category', result,view='Grid view')
        for field in match:
            try:
                res = field['fields']
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                summary = res['summary']
                summary = remove_non_ascii(summary)                   
                name = res['Name']
                name = remove_non_ascii(name)
                link1 = res['link1']
                link2 = res['link2']
                link3 = res['link3']
                link4 = res['link4']
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<link>"\
                       "<sublink>%s</sublink>"\
                       "<sublink>%s</sublink>"\
                       "<sublink>%s</sublink>"\
                       "<sublink>%s</sublink>"\
                       "</link>"\
                       "</item>" % (name,thumbnail,fanart,summary,link1,link2,link3,link4)                                                               
            except:
                pass                  
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)    
Ejemplo n.º 21
0
def open_table(url):
    band = url.split("|")[1]
    pins = "PLuginotbmusic" + band
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        lai = []
        at1 = Airtable(tid, tnm, api_key=atk)
        m1 = at1.get_all(maxRecords=1200, view='Grid view')
        for f1 in m1:
            r1 = f1['fields']
            n1 = r1['au1']
            lai.append(n1)
        if yai in lai:
            pass
        else:
            exit()
        xml = ""
        band = url.split("|")[1]
        gen = url.split("|")[2]
        table = url.split("|")[3]
        at = Airtable('appP8lvtpGOO2KPn7',
                      'Categories',
                      api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=1200, view='Grid view')
        for field in match:
            try:
                res = field['fields']
                name = res['Name']
                name = remove_non_ascii(name)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link = res['link']
                title = band + " " + name
                xml +=  "<item>"\
                        "<title>%s</title>"\
                        "<thumbnail>%s</thumbnail>"\
                        "<fanart>%s</fanart>"\
                        "<link>"\
                        "<otb_music>open|%s|%s|%s|%s</otb_music>"\
                        "</link>"\
                        "</item>" % (title,thumbnail,fanart,name,band,gen,table)

            except:
                pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 22
0
def get_show(url):
    pins = "PLugintvmazeshow" + url
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        tv_title = url.split("/")[-2]
        tv_title = remove_non_ascii(tv_title)
        Title = remove_non_ascii(tv_title)
        Title = Title.lower()
        Title = Title.encode('utf8')
        Title = Title.replace(" ", "%20")
        html = "https://api.themoviedb.org/3/search/tv?api_key=%s&language=en-US&query=%s&page=1" % (
            TMDB_api_key, Title)
        html2 = requests.get(html).json()
        result = html2['results'][0]
        tmdb_id = result['id']
        date = result['first_air_date']
        year = date.split("-")[0]
        fanart = result['backdrop_path']
        fanart = fanart.replace("/", "")
        tmdb_fanart = "https://image.tmdb.org/t/p/original/" + str(fanart)
        url3 = "https://api.themoviedb.org/3/tv/%s/external_ids?api_key=%s&language=en-US" % (
            tmdb_id, TMDB_api_key)
        html4 = requests.get(url3).json()
        imdb = html4['imdb_id']
        tvdb = html4['tvdb_id']
        url2 = "https://api.themoviedb.org/3/tv/%s?api_key=%s&language=en-US" % (
            tmdb_id, TMDB_api_key)
        html3 = requests.get(url2).json()
        seas = html3['seasons']
        for seasons in seas:
            thumb = seasons['poster_path']
            thumb = "https://image.tmdb.org/t/p/original" + str(thumb)
            title = remove_non_ascii(seasons["name"])
            sea_num = seasons['season_number']
            sea_year = seasons['air_date']
            xml += "<dir>"\
                   "<title>%s</title>"\
                   "<year>%s</year>"\
                   "<thumbnail>%s</thumbnail>"\
                   "<fanart>%s</fanart>"\
                   "<tvmaze>season/%s/%s/%s/%s/%s/%s/%s</tvmaze>"\
                   "</dir>" % (title, year, thumb, tmdb_fanart, year, tv_title, fanart, imdb, tvdb, tmdb_id, sea_num)

    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 23
0
def get_game(url):
    xml = ""
    current = str(url.split("/")[-1])
    pins = "PLuginmetacritictheaters" + current
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        try:
            url = "https://www.metacritic.com/browse/movies/release-date/theaters/date?page=" + current
            r = scraper.get(url).content
            m = re.compile(
                '<td class="clamp-image-wrap">.+?<a href="(.+?)".+?<img src="(.+?)".+?alt="(.+?)".+?<span>(.+?)</span>.+?<div class="summary">(.+?)</div>',
                re.DOTALL).findall(r)
            for link, image, name, date, summary in m:
                link = base_link + link
                name = remove_non_ascii(name)
                name = clean_search(name)
                name = name.encode('utf8')
                summary = clean_search(summary)
                summary = remove_non_ascii(summary)
                summary = summary.encode('utf8')
                image = image.replace("-98", "-250h")
                xml += "<item>"\
                       "<title>%s : [COLOR=blue]In Theaters: [/COLOR]%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<metacritic>link**%s**%s**%s</metacritic>"\
                       "</item>" % (name,date,image,image,summary,link,name,image)
        except:
            pass

        next_page = int(current) + 1
        xml += "<item>"\
               "<title>[COLOR dodgerblue]Next Page >>[/COLOR]</title>"\
               "<metacritic>theaters/%s</metacritic>"\
               "<thumbnail>http://www.clker.com/cliparts/a/f/2/d/1298026466992020846arrow-hi.png</thumbnail>"\
               "</item>" % (next_page)

    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 24
0
def open_table():
    pins = "PLuginotbmusic"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        lai = []
        at1 = Airtable(tid, tnm, api_key=atk)
        m1 = at1.get_all(maxRecords=1200, view='Grid view')
        for f1 in m1:
            r1 = f1['fields']
            n1 = r1['au1']
            lai.append(n1)
        if yai in lai:
            pass
        else:
            exit()
        xml = ""
        at = Airtable('appn8GRJzxzmi6Xph',
                      'music_genre',
                      api_key='keyikW1exArRfNAWj')
        match = at.get_all(maxRecords=1200, view='Grid view')
        for field in match:
            try:
                res = field['fields']
                name = res['Name']
                name = remove_non_ascii(name)
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                link = res['link']
                summary = res['Summary']
                xml +=  "<item>"\
                        "<title>%s</title>"\
                        "<thumbnail>%s</thumbnail>"\
                        "<fanart>%s</fanart>"\
                        "<summary>%s</summary>"\
                        "<link>"\
                        "<otb_music>genre|%s</otb_music>"\
                        "</link>"\
                        "</item>" % (name,thumbnail,fanart,summary,link)

            except:
                pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 25
0
def open_items(url):
    pins = "PLugindccomics"+url
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)  
    else:    
        xml = ""
        title = url.split("|")[-2]
        key = url.split("|")[-1]
        result = title+"_season"
        at = Airtable(key, title, api_key='keyem86gyhcLFSLqh')
        match = at.search('category', result,view='Grid view')
        for field in match:
            try:
                res = field['fields']   
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                summary = res['summary']
                summary = remove_non_ascii(summary)                   
                name = res['name']
                name = remove_non_ascii(name)
                link1 = res['link1']
                url2 = title+"|"+key+"|"+name                                                 
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<link>"\
                       "<dccomics>season|%s</dccomics>"\
                       "</link>"\
                       "</item>" % (name,thumbnail,fanart,summary,url2)
            except:
                pass                                                                     
        jenlist = JenList(xml)
        display_list(jenlist.get_list(), jenlist.get_content_type(), pins)    
Ejemplo n.º 26
0
def get_game(url):
    current = url.split("/")[-1]
    pins = "PLuginmoviefone" + current
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        try:
            url = "https://www.moviefone.com/movie-trailers/videos/?page=" + current
            html = requests.get(url).content
            match = re.compile(
                '<a class="poster-link" href="(.+?)".+?data-src="(.+?)".+?alt="(.+?)".+?<div class="description">(.+?)</div>',
                re.DOTALL).findall(html)
            for link1, thumbnail, name, summary in match:
                name = name.replace("&#039;", "")
                name = remove_non_ascii(name)
                summary = clean_search(summary)
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<moviefone>link**%s**%s**%s</moviefone>"\
                       "</item>" % (name,thumbnail,thumbnail,summary,link1,name,thumbnail)
        except:
            pass
        next_page = int(current) + 1
        xml += "<item>"\
               "<title>[COLOR lightseagreen]Next Page >>[/COLOR]</title>"\
               "<moviefone>trailers/%s</moviefone>"\
               "<thumbnail>http://www.clker.com/cliparts/a/f/2/d/1298026466992020846arrow-hi.png</thumbnail>"\
               "</item>" % (next_page)

    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 27
0
def get_list(url):
    """display jen list"""
    pins = url
    Pins = clean_url(url)
    Items = fetch_from_db(Pins)
    if Items:
        display_data(Items)
        return True
    else:
        global content_type
        jen_list = JenList(url)
        if not jen_list:
            koding.dolog(_("returned empty for ") + url)
        items = jen_list.get_list()
        content = jen_list.get_content_type()
        if items == []:
            return False
        if content:
            content_type = content
        display_list(items, content_type, pins)
        return True
Ejemplo n.º 28
0
def open_otb_tv_shows():
    pins = "PLuginotbtvshowmain"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        at = Airtable('appPIqgXesUHBVoOd',
                      'tv_shows',
                      api_key='keyu3sl4tsBzw02pw')
        match = at.get_all(maxRecords=700, sort=['name'])
        for field in match:
            try:
                res = field['fields']
                thumbnail = res['thumbnail']
                fanart = res['fanart']
                summary = res['summary']
                if not summary:
                    summary = ""
                else:
                    summary = remove_non_ascii(summary)
                name = res['name']
                name = remove_non_ascii(name)
                xml += "<item>"\
                       "<title>%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<otb_tv>show|%s</otb_tv>"\
                       "</item>" % (name,thumbnail,fanart,summary,res['link1'])
            except:
                pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 29
0
def get_game(url):
    pins = "PLuginmetacriticdvd"
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        try:
            url = "https://www.metacritic.com/browse/dvds/release-date/coming-soon/date"
            r = scraper.get(url).content
            m = re.compile(
                '<td class="clamp-image-wrap">.+?<a href="(.+?)".+?<img src="(.+?)".+?alt="(.+?)".+?<span>(.+?)</span>.+?<div class="summary">(.+?)</div>',
                re.DOTALL).findall(r)
            for link, image, name, date, summary in m:
                link = base_link + link
                name = remove_non_ascii(name)
                name = clean_search(name)
                name = name.encode('utf8')
                summary = clean_search(summary)
                summary = remove_non_ascii(summary)
                summary = summary.encode('utf8')
                image = image.replace("-98", "-250h")
                xml += "<item>"\
                       "<title>%s : [COLOR=blue]DVD Release: [/COLOR]%s</title>"\
                       "<meta>"\
                       "<content>movie</content>"\
                       "<imdb></imdb>"\
                       "<title></title>"\
                       "<year></year>"\
                       "<thumbnail>%s</thumbnail>"\
                       "<fanart>%s</fanart>"\
                       "<summary>%s</summary>"\
                       "</meta>"\
                       "<metacritic>link**%s**%s**%s</metacritic>"\
                       "</item>" % (name,date,image,image,summary,link,name,image)
        except:
            pass

    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)
Ejemplo n.º 30
0
def get_network(url):
    pins = "PLugintvmazenetwork" + url
    Items = fetch_from_db2(pins)
    if Items:
        display_data(Items)
    else:
        xml = ""
        last = url.split("/")[-2]
        num = url.split("/")[-1]
        html = "https://www.tvmaze.com/shows?Show%5Bnetwork_id%5D=" + last + "&page=" + num
        html2 = requests.get(html).content
        match = re.compile(
            '<div class="card primary grid-x">.+?<a href="(.+?)".+?<img src="(.+?)".+?<a href=".+?">(.+?)</a>',
            re.DOTALL).findall(html2)
        for link, image, name in match:
            link = link.split("/")[-2]
            thumb = "http:" + image
            xml += "<dir>"\
                   "<title>%s</title>"\
                   "<thumbnail>%s</thumbnail>"\
                   "<tvmaze>show/%s/%s</tvmaze>"\
                   "</dir>" % (name, thumb, name, link)
        try:
            match2 = re.compile(
                '<ul class="pagination">.+?<li class="current"><a href="(.+?)"',
                re.DOTALL).findall(html2)[0]
            page = match2.split(";")[-1]
            page = page.replace("page=", "")
            page = int(page)
            next_page = page + 1
            xml += "<dir>"\
                   "<title>[COLOR dodgerblue]Next Page >>[/COLOR]</title>"\
                   "<tvmaze>network/%s/%s</tvmaze>"\
                   "<thumbnail>http://www.clker.com/cliparts/a/f/2/d/1298026466992020846arrow-hi.png</thumbnail>"\
                   "</dir>" % (last, next_page)
        except:
            pass
    jenlist = JenList(xml)
    display_list(jenlist.get_list(), jenlist.get_content_type(), pins)