• 1
  • 83
  • 84
  • 85(current)
  • 86
  • 87
  • 107
[RELEASE] Free Cable - US station aggregator
Does anyone have Fanboy and Chum Chum working in Free Cable? I'm getting a script error on that program in particular, but the videos appear to be on Nickelodeon.

http://www.nick.com/videos/fanboy-chum-chum-videos

If I knew how to find/create the code in the FreeCable addon, I'd try that, but can't seem to figure it out!

Here is my log file...

http://www.xbmclogs.com/show.php?id=3907

Thx
Reply
Here is my ABC RSS mode only fix for ABC (i'm sure this isn't the best way to fix this, but it seems to work until Bluecop gets a chance to fix this properly). I can't seem to figure out how to fix the non RSS mode.

in the abc.py file, notice the 2 new lines and 1 modified line (I put a comment #teefer22 blahblahblah right before the lines I added/changed):
Code:
def seasons(url=common.args.url):
    if common.addoncompat.get_setting('abc_rss')=='true':
        rss=True
    else:
        rss=False
    data = common.getURL(url)
    print 'ABC url is'
    print url
    season_set = makeDict(re.compile('season.set\(\{(.+?)\}\);').findall(data)[0])
    season_url = BASE+season_set['service']
    showid = season_set['showid']
    tabs_set = makeDict(re.compile('tabs.set\(\{(.+?)\}\);').findall(data)[0])
    #teefer22 added the below 1 line
    tabs_set['service'] = tabs_set['service'].replace('feptabs','tabs')

    tabs_url = BASE+tabs_set['service']
    content_set = makeDict(re.compile('content.set\(\{(.+?)\}\);').findall(data)[0])
    content_url = BASE+content_set['service']
    for season in BeautifulSoup(common.getURL(season_url), convertEntities=BeautifulSoup.HTML_ENTITIES).findAll('a'):
        seasonid = season['seasonid']
        season_name = season.string
        tabs_url = tabs_url.replace('(seasonid)',seasonid)
        tab_data = BeautifulSoup(common.getURL(tabs_url), convertEntities=BeautifulSoup.HTML_ENTITIES).find('a')
        playlistid = tab_data['playlistid']
        playlistcount = tab_data['playlistcount']
        rss_url = tabs_set['rss'].replace('(playlistid)',playlistid).replace('-1/-1/-1',str(seasonid)+'/-1/-1')
        #teefer22 added the below 1 line
        rss_url = rss_url.replace('(seasonid)',seasonid)

        content_url = content_url.replace('(seasonid)',seasonid).replace('(playlistid)',playlistid).replace('(start)','0').replace('(size)',str(playlistcount))
        if rss:
            common.addDirectory(season_name, 'abc', 'episodesRSS', rss_url)
        else:
            common.addDirectory(season_name, 'abc', 'episodes', content_url)
        
    #CLIPS
    try:
        tabs_set = makeDict(re.compile('tabs.set\(\{(.+?)\}\);').findall(data)[1])
        content_set = makeDict(re.compile('content.set\(\{(.+?)\}\);').findall(data)[1])
        content_url = BASE+content_set['service']
        tabs_url = BASE+tabs_set['service']
        tabs = BeautifulSoup(common.getURL(tabs_url), convertEntities=BeautifulSoup.HTML_ENTITIES).findAll('a')
        for tab in tabs:
            name = tab.string
            playlistid = tab['playlistid']
            playlistcount = tab['playlistcount']
            rss_url = tabs_set['rss'].replace('(playlistid)',playlistid)
            content_url = content_url.replace('view=showsplaylist','view=showsfplaylist').replace('(playlistid)',playlistid).replace('(start)','0').replace('(size)',str(playlistcount)).replace('(max)',str

(playlistcount))
            if rss:
                common.addDirectory(name, 'abc', 'episodesRSS', rss_url)
            else:
                common.addDirectory(name, 'abc', 'episodes', content_url)
    except:pass
    common.setView('seasons')
    
def makeDict(sets):
    #teefer22 modified the below 1 line
    sets = sets.split(', "')
    season_dict={}
    for set in sets:
        split = set.replace('"','').split(':',1)
        season_dict[split[0].strip()]=split[1].strip()
    return season_dict
Reply
I am having the same ABC issues as other/all of us seem to be having.

But is anyone else also having a problem accessing USA's shows as well?

The shows are listed, but when you select them, nothing happens.

Is it just me? I would like to watch my episodes of Suits and Psych Smile

Thanks Smile
Reply
I'm having the same issues with abc.py as everyone else. I was not able to make teefer22's fix to work on my system.

Code:
start of FREE CABLE plugin
17:51:08 T:2895096640  NOTICE: FREE CABLE --> common :: getURL :: url = http://abc.go.com/watch/boston-med/SH5570013?rfr=rss
17:51:10 T:2895096640   ERROR: Error Type: <type 'exceptions.IndexError'>
17:51:10 T:2895096640   ERROR: Error Contents: list index out of range
17:51:10 T:2895096640   ERROR: Traceback (most recent call last):
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/default.py", line 68, in <module>
                                                modes ( )
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/default.py", line 64, in modes
                                                exec 'sitemodule.%s()' % common.args.sitemode
                                              File "<string>", line 1, in <module>
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/resources/lib/abc.py", line 48, in seasons
                                                tabs_set = makeDict(re.compile('tabs.set\(\{(.+?)\}\);').findall(data)[0])
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/resources/lib/abc.py", line 91, in makeDict
                                                season_dict[split[0].strip()]=split[1].strip()
                                            IndexError: list index out of range
17:51:10 T:3076655040   ERROR: GetDirectory - Error getting plugin://plugin.video.free.cable/?url="http%3A%2F%2Fabc.go.com%2Fwatch%2Fboston-med%2FSH5570013%3Frfr%3Drss"&mode="abc"&sitemode="seasons"&thumb="http%3A%2F%2Fthetvdb.com%2Fbanners%2Fgraphical%2F171811-g.jpg"&tvdb_id="171811"&fanart="http%3A%2F%2Fthetvdb.com%2Fbanners%2Ffanart%2Foriginal%2F171811-1.jpg"&poster="http%3A%2F%2Fthetvdb.com%2Fbanners%2Fposters%2F171811-1.jpg"&name="Boston+Med"
17:51:10 T:3076655040   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.free.cable/?url="http%3A%2F%2Fabc.go.com%2Fwatch%2Fboston-med%2FSH5570013%3Frfr%3Drss"&mode="abc"&sitemode="seasons"&thumb="http%3A%2F%2Fthetvdb.com%2Fbanners%2Fgraphical%2F171811-g.jpg"&tvdb_id="171811"&fanart="http%3A%2F%2Fthetvdb.com%2Fbanners%2Ffanart%2Foriginal%2F171811-1.jpg"&poster="http%3A%2F%2Fthetvdb.com%2Fbanners%2Fposters%2F171811-1.jpg"&name="Boston+Med") failed

                                            start of FREE CABLE plugin
18:00:32 T:2895096640  NOTICE: FREE CABLE --> common :: getURL :: url = http://abc.go.com/watch/celebrity-wife-swap/SH55157026?rfr=rss
18:00:33 T:2895096640   ERROR: Error Type: <type 'exceptions.IndexError'>
18:00:33 T:2895096640   ERROR: Error Contents: list index out of range
18:00:33 T:2895096640   ERROR: Traceback (most recent call last):
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/default.py", line 68, in <module>
                                                modes ( )
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/default.py", line 64, in modes
                                                exec 'sitemodule.%s()' % common.args.sitemode
                                              File "<string>", line 1, in <module>
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/resources/lib/abc.py", line 48, in seasons
                                                tabs_set = makeDict(re.compile('tabs.set\(\{(.+?)\}\);').findall(data)[0])
                                              File "/home/xmbc/.xbmc/addons/plugin.video.free.cable/resources/lib/abc.py", line 91, in makeDict
                                                season_dict[split[0].strip()]=split[1].strip()
                                            IndexError: list index out of range
18:00:33 T:3076655040   ERROR: GetDirectory - Error getting plugin://plugin.video.free.cable/?url="http%3A%2F%2Fabc.go.com%2Fwatch%2Fcelebrity-wife-swap%2FSH55157026%3Frfr%3Drss"&mode="abc"&sitemode="seasons"&thumb="%2Fhome%2Fxmbc%2F.xbmc%2Faddons%2Fplugin.video.free.cable%2Fresources%2Fimages%2Fabc.png"&tvdb_id="254524"&name="Celebrity+Wife+Swap"
18:00:33 T:3076655040   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.free.cable/?url="http%3A%2F%2Fabc.go.com%2Fwatch%2Fcelebrity-wife-swap%2FSH55157026%3Frfr%3Drss"&mode="abc"&sitemode="seasons"&thumb="%2Fhome%2Fxmbc%2F.xbmc%2Faddons%2Fplugin.video.free.cable%2Fresources%2Fimages%2Fabc.png"&tvdb_id="254524"&name="Celebrity+Wife+Swap") failed
Reply
chrisl1977 - Make sure you remember to also change this line in the def makeDict(sets) function:

sets = sets.split(',')
to
sets = sets.split(', "')
Reply
Same here, not working.

Please post fixed abc.py file.
Reply
Problem is that if you copy paste the above changes, ? or unknown characters are introduced.
Verify the following -
content_url = content_url.replace('(seasonid)',seasonid).replace('(playlistid)',playlistid).re​place('(start)','0').replace('(size)',str(playlistcount))

content_url = content_url.replace('view=showsplaylist','view=showsfplaylist').replace('(playlistid)',playlistid).replace('(start)','0').replace('(size)',str(playlistcount)).replace('(max)',str(playlistcount))

Hope this helps!
Reply
Since no one has asked this before. Is it possible to add Disney Junior to this addon. They do have a few episodes available online.
Intel® Quad Core i5 Sandybridge @3.40GHz | ASRock Z775 Mobo 8GB DDR3 Ram | Logitech K400 Keyboard |
| Logitec Harmony 550 Remote| 46' Samsung LCD TV | Onkyo TX-S605 w/ Bose 5.1 Surround
Reply
Thanks Teefer - your fix worked for me! If you are having problems, check for tabs. I had one that in an added line that kept throwing an error.
Reply
Can some be nice and upload the abc.py file? It's still not working for me after fixing. Thx
// GitHub // Repository

// USTV VoD (Video-on-Demand) / World News Live / MRT Play
Reply
I've made the changes that teefer suggested, and I no longer get the script error message. What I get is a listing of the shows and then when I go to the show's listing, there are none there. I verified the information that DesertDweller said to check, but I don't know python. I'd like to request that someone post their fixed abc.py file also. Thanks in advance.
Reply
Here you go. Sometimes browser adds escape characters that may appear as ? in the content when one copies from web to text editor.
Make sure it's only ASCII Text edtor with characters <128.
abc.py
Code:
import xbmcplugin
import xbmc
import xbmcgui
import urllib
import urllib2
import sys
import os
import re

from BeautifulSoup import BeautifulStoneSoupaz
from BeautifulSoup import BeautifulSoup
import resources.lib._common as common

pluginhandle = int(sys.argv[1])
showlist= 'http://cdn.abc.go.com/vp2/ws-supt/s/syndication/2000/rss/001/001/-1/-1/-1/-1/-1/-1'
BASE = 'http://abc.go.com'

def masterlist():
    return rootlist(db=True)

def rootlist(db=False):
    data = common.getURL(showlist)
    tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    menu=tree.findAll('item')
    db_shows = []
    for item in menu:
        name = item('title')[0].string.encode('utf-8')
        url = item('link')[0].string
        thumb = item('image')[0].string
        if db==True:
            db_shows.append((name,'abc','seasons',url))
        else:
            common.addShow(name, 'abc', 'seasons', url )# , thumb)
    if db==True:
        return db_shows
    else:
        common.setView('tvshows')
        
def seasons(url=common.args.url):
    if common.addoncompat.get_setting('abc_rss')=='true':
        rss=True
    else:
        rss=False
    data = common.getURL(url)
    season_set = makeDict(re.compile('season.set\(\{(.+?)\}\);').findall(data)[0])
    season_url = BASE+season_set['service']
    showid = season_set['showid']
    tabs_set = makeDict(re.compile('tabs.set\(\{(.+?)\}\);').findall(data)[0])
    #teefer22 added the below 1 line
    tabs_set['service'] = tabs_set['service'].replace('feptabs','tabs')

    tabs_url = BASE+tabs_set['service']
    content_set = makeDict(re.compile('content.set\(\{(.+?)\}\);').findall(data)[0])
    content_url = BASE+content_set['service']
    for season in BeautifulSoup(common.getURL(season_url), convertEntities=BeautifulSoup.HTML_ENTITIES).findAll('a'):
        seasonid = season['seasonid']
        season_name = season.string
        tabs_url = tabs_url.replace('(seasonid)',seasonid)
        tab_data = BeautifulSoup(common.getURL(tabs_url), convertEntities=BeautifulSoup.HTML_ENTITIES).find('a')
        playlistid = tab_data['playlistid']
        playlistcount = tab_data['playlistcount']
        rss_url = tabs_set['rss'].replace('(playlistid)',playlistid).replace('-1/-1/-1',str(seasonid)+'/-1/-1')
        #teefer22 added the below 1 line
        rss_url = rss_url.replace('(seasonid)',seasonid)

        content_url = content_url.replace('(seasonid)',seasonid).replace('(playlistid)',playlistid).replace('(start)','0').replace('(size)',str(playlistcount))
        if rss:
            common.addDirectory(season_name, 'abc', 'episodesRSS', rss_url)
        else:
            common.addDirectory(season_name, 'abc', 'episodes', content_url)
        
    #CLIPS
    try:
        tabs_set = makeDict(re.compile('tabs.set\(\{(.+?)\}\);').findall(data)[1])
        content_set = makeDict(re.compile('content.set\(\{(.+?)\}\);').findall(data)[1])
        content_url = BASE+content_set['service']
        tabs_url = BASE+tabs_set['service']
        tabs = BeautifulSoup(common.getURL(tabs_url), convertEntities=BeautifulSoup.HTML_ENTITIES).findAll('a')
        for tab in tabs:
            name = tab.string
            playlistid = tab['playlistid']
            playlistcount = tab['playlistcount']
            rss_url = tabs_set['rss'].replace('(playlistid)',playlistid)
            content_url = content_url.replace('view=showsplaylist','view=showsfplaylist').replace('(playlistid)',playlistid).replace('(start)','0').replace('(size)',str(playlistcount)).replace('(max)',str(playlistcount))
            if rss:
                common.addDirectory(name, 'abc', 'episodesRSS', rss_url)
            else:
                common.addDirectory(name, 'abc', 'episodes', content_url)
    except:pass
    common.setView('seasons')
    
def makeDict(sets):
    #teefer22 modified the below 1 line
    sets = sets.split(', "')
    season_dict={}
    for set in sets:
        split = set.replace('"','').split(':',1)
        season_dict[split[0].strip()]=split[1].strip()
    return season_dict

def episodes(url=common.args.url):
    data = common.getURL(url)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    menu=tree.findAll('div',attrs={'class':'tile'})
    for item in menu:
        link = item.find('div',attrs={'class':'tile_title'}).find('a')
        name = link.string
        url = link['href']
        thumb = item.find('img')['src']
        try: description = item.find('div',attrs={'class':'tile_desc'}).string
        except: description = ''
        show_tile_sub = item.find('div',attrs={'class':'show_tile_sub'}).string.split('|')
        airDate = show_tile_sub[1].replace(' Aired on ','').strip()
        duration = show_tile_sub[0].strip()
        u = sys.argv[0]
        u += '?url="'+urllib.quote_plus(url)+'"'
        u += '&mode="abc"'
        u += '&sitemode="play"'
        infoLabels={ "Title":name,
                     "Plot":description,
                     "premiered":common.formatDate(airDate,'%m/%d/%y'),
                     "Duration":duration,
                     }
        common.addVideo(u,name,thumb,infoLabels=infoLabels)
    common.setView('episodes')

def seasonsRSS(url=common.args.url):
    data = common.getURL(url)
    tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
    video_rss = menu=tree.find(attrs={'type' : 'application/rss+xml'})['href']
    showid=url.split('?')[0].split('/')[-1]
    url='http://abc.go.com/vp2/s/carousel?service=seasons&parser=VP2_Data_Parser_Seasons&showid='+showid+'&view=season&bust=07000001_3'
    data = common.getURL(url)
    tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    seasons=tree.findAll('a')
    for season in seasons:
        seasonid=season['seasonid']
        name=season.string.strip()
        url=video_rss.replace('-1/-1/-1',seasonid+'/-1/-1')
        common.addDirectory(name, 'abc', 'episodes', url )
    common.setView('seasons')

def episodesRSS(url=common.args.url):
    data = common.getURL(url)
    tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    menu=tree.findAll('item')
    for item in menu:
        namedata = item('title')[0].string.encode('utf-8').split(' Full Episode - ')
        name = namedata[0]
        season = int(namedata[1].split(' - ')[0].split(' | ')[1].replace('s',''))
        episode = int(namedata[1].split(' - ')[0].split(' | ')[0].replace('e',''))
        tvshow = namedata[1].split(' - ')[1]
        url = item('link')[0].string
        thumb = item('image')[0].string
        airDate = item('pubdate')[0].string.split('T')[0]
        descriptiondata = re.compile('<p>(.+?)</p>').findall(item('description')[0].string)[0].split('<br>')
        description = descriptiondata[0]
        duration = descriptiondata[-2].replace('Duration: ','')
        displayname = '%sx%s - %s' % (str(season),str(episode),name)
        u = sys.argv[0]
        u += '?url="'+urllib.quote_plus(url)+'"'
        u += '&mode="abc"'
        u += '&sitemode="play"'
        infoLabels={ "Title":name,
                     "Season":season,
                     "Episode":episode,
                     "Plot":description,
                     "premiered":airDate,
                     "Duration":duration,
                     "TVShowTitle":tvshow
                     }
        common.addVideo(u,displayname,thumb,infoLabels=infoLabels)
    common.setView('episodes')
        
def play(url=common.args.url):
    finalurl=False
    playpath=False
    vid=re.compile('(VD\d*)').findall(url)[0]
    rtmpdata = 'http://cdn.abc.go.com/vp2/ws/s/contents/2003/utils/video/mov/13/9024/%s/432?v=06000007_3' % vid
    data = common.getURL(rtmpdata)
    tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    hosts = tree.findAll('host')
    for host in hosts:
        if host['name'] == 'L3':
            rtmp = 'rtmp://%s/%s' % (host['url'], host['app'])
    filenames = tree.findAll('video')
    hbitrate = -1
    sbitrate = int(common.settings['quality'])
    platpath=False
    for filename in filenames:
        if filename['src'] <> '':
            bitrate = int(float(filename['bitrate']))
            if bitrate > hbitrate and bitrate <= sbitrate:
                hbitrate = bitrate
                playpath = filename['src']
    if playpath:
        swfUrl = 'http://livepassdl.conviva.com/ver/2.27.0.42841/LivePassModuleMain.swf'
        finalurl = rtmp+' playpath='+playpath + " swfurl=" + swfUrl + " swfvfy=true"
    else:
        plid= re.compile('(PL\d*)').findall(url)[0]
        clipurl = 'http://abc.go.com/vp2/ws/s/contents/1000/videomrss?brand=001&device=001&start=0&limit=100&fk=CATEGORIES&fv='+plid
        data = common.getURL(clipurl)
        tree=BeautifulStoneSoup(data, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
        for video in tree.findAll('item'):
            if video.find('guid').string == vid:
                finalurl = video.find('media:content')['url']
    if finalurl:    
        item = xbmcgui.ListItem(path=finalurl)
        xbmcplugin.setResolvedUrl(pluginhandle, True, item)
Reply
Thank you!
Reply
Still not working for me.

Can someone please upload the abc.py file.
Reply
How do I know which ? to replace with nothing?
Reply
  • 1
  • 83
  • 84
  • 85(current)
  • 86
  • 87
  • 107

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Free Cable - US station aggregator10