Пример #1
0
 def __init__(self, *args, **kwargs):
     self._plugin = PluginFactory.factory()
     self._log('Constructed')
Пример #2
0
 def _log(cls, msg):
     PluginFactory.factory().log(msg, cls.__name__)
Пример #3
0
def getSetting(key):
    return xbmcplugin.getSetting(PluginFactory.factory().handle, key)
Пример #4
0
import urllib2
import cookielib
import os.path
import re
import sys, urllib
from resources.sftv import config, plugin
from BeautifulSoup import BeautifulStoneSoup
from resources.sftv.plugin import PluginFactory
import simplejson
import xbmcplugin

pluginName = sys.modules['__main__'].__plugin__

plugin = PluginFactory.factory()

def loadXml(url):
    """Fetch and parse XML from the given URL"""
    return getXml(loadUrl(url))

def loadUrl(url):
    """Load content from url"""
    request = urllib2.urlopen(url)
    return request.read()

def getJson(json):
    return simplejson.loads(json)

def loadJson(url):
    return getJson(loadUrl(url))

def getXml(xml):