예제 #1
0
import urllib,re,sys,os
import xbmc, xbmcgui, xbmcaddon, xbmcplugin
import main
import BeautifulSoup
import simplejson as json

#Mash Up - by Mash2k3 2012.

from resources.libs import settings 
addon_id = settings.getAddOnID()

selfAddon = xbmcaddon.Addon(id=addon_id)
art = main.art
MainUrl='http://www.desirulez.net/'
prettyName='DesiRulez'
def getShowImage(channelName, showName):
    baseURL = 'https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q={query}'
    query = channelName.lower() + ' ' + showName.lower() + ' poster'
    url = baseURL.format(query=urllib.quote_plus(query))
    try:
        link = main.OPENURL(url)
        results = json.loads(link)['responseData']['results']
        for image_info in results:
            iconImage = image_info['unescapedUrl']
            break
        if iconImage is not None:
            return iconImage
        else:
            return ''
    except Exception, e:
        xbmc.log('Movie25-Mod ERROR - Importing Modules: '+str(e), xbmc.LOGERROR)
예제 #2
0
import urllib, urllib2, re, cookielib, string, urlparse, sys, os
import xbmc, xbmcgui, xbmcaddon, xbmcplugin, urlresolver
from resources.libs import main, settings

#Mash Up - by Mash2k3 2012.

from t0mm0.common.addon import Addon
from resources.universal import playbackengine, watchhistory
addon_id = settings.getAddOnID()
selfAddon = xbmcaddon.Addon(id=addon_id)
addon = Addon(addon_id, sys.argv)
art = main.art
wh = watchhistory.WatchHistory(addon_id)


def DISJR():
    main.addDir('All Videos',
                'http://disneyjunior.com/_grill/json/video?r=1-1&l=31&o=0',
                109, art + '/disjr.png')
    main.addDir('By Character', 'charac', 108, art + '/disjr.png')


def DISJRList(murl):
    if murl == 'music':
        url = 'http://disney.go.com/disneyjunior/data/tilePack?id=1815108&maxAmount=240'
        link = main.OPENURL(url)
        match = re.compile(
            '<a href="(.+?)" ping=".+?"/>\n\t\t<img src="(.+?)" />\n\t\t<text class="title"><(.+?)>'
        ).findall(link)
        for url, thumb, name in match:
            name = name.replace('![CDATA[', ' ').replace(']]', ' ')