def __init__(self, logger, args_map): self.logger = logger self.args_map = args_map self.getSettings() self.get_HTML = Fetcher(logger, xbmc.translatePath).getHTML self.user = User(self.get_HTML) self.ted_talks = ted_talks_scraper.TedTalks(self.get_HTML)
def setUp(self): self.ted_talks = ted_talks_scraper.TedTalks(getHTML)
def setUp(self): self.logger = MagicMock() self.ted_talks = ted_talks_scraper.TedTalks( CachedHTMLProvider().get_HTML, self.logger)
def __init__(self, args_map): self.args_map = args_map self.get_HTML = Fetcher(plugin.report, xbmc.translatePath).getHTML self.ted_talks = ted_talks_scraper.TedTalks(self.get_HTML, plugin.report)
import sys import urllib import ted_talks_scraper import xbmc import xbmcplugin import xbmcgui from talkDownloader import Download from subtitleDownloader import Subtitle import xbmcaddon __settings__ = xbmcaddon.Addon(id='plugin.video.ted.talks.sami') getLS = __settings__.getLocalizedString #getLS = xbmc.getLocalizedString TedTalks = ted_talks_scraper.TedTalks() class updateArgs: def __init__(self, *args, **kwargs): for key, value in kwargs.iteritems(): if value == 'None': kwargs[key] = None else: kwargs[key] = urllib.unquote_plus(kwargs[key]) self.__dict__.update(kwargs) class UI: def __init__(self):