def get_settings(cls): settings = super(Flixanity_Scraper, cls).get_settings() name = cls.get_name() settings.append( ' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n('username'))) settings.append( ' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n('password'))) return settings
def get_settings(cls): settings = super(MyVidLinks_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append( ' <setting id="%s-filter" type="slider" range="0,180" option="int" label=" %s" default="30" visible="eq(-6,true)"/>' % (name, i18n('filter_results_days'))) settings.append( ' <setting id="%s-select" type="enum" label=" %s" lvalues="30636|30637" default="0" visible="eq(-7,true)"/>' % (name, i18n('auto_select'))) return settings
def get_settings(cls): settings = super(Shush_Proxy, cls).get_settings() name = cls.get_name() settings.append( ' <setting id="%s-scraper_url" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n("scraper_location")) ) settings.append( ' <setting id="%s-scraper_password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n("scraper_key")) ) return settings
def get_settings(cls): settings = super(Alluc_Scraper, cls).get_settings() name = cls.get_name() settings.append( ' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n("username")) ) settings.append( ' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n("password")) ) return settings
def get_settings(cls): settings = super(OroroTV_Scraper, cls).get_settings() name = cls.get_name() settings.append( ' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n('username'))) settings.append( ' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n('password'))) settings.append( ' <setting id="%s-include_premium" type="bool" label=" %s" default="false" visible="eq(-6,true)"/>' % (name, i18n('include_premium'))) return settings
def get_settings(cls): settings = super(MyVidLinks_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append( ' <setting id="%s-filter" type="slider" range="0,180" option="int" label=" %s" default="30" visible="eq(-4,true)"/>' % (name, i18n("filter_results_days")) ) settings.append( ' <setting id="%s-select" type="enum" label=" %s" lvalues="30636|30637" default="0" visible="eq(-5,true)"/>' % (name, i18n("auto_select")) ) return settings
def get_settings(cls): settings = super(RlsBB_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append( ' <setting id="%s-filter" type="slider" range="0,180" option="int" label=" %s" default="60" visible="eq(-4,true)"/>' % (name, i18n('filter_results_days'))) settings.append( ' <setting id="%s-select" type="enum" label=" %s" lvalues="30636|30637" default="0" visible="eq(-5,true)"/>' % (name, i18n('auto_select'))) settings.append( ' <setting id="%s-include_comments" type="bool" label=" %s" default="false" visible="eq(-6,true)"/>' % (name, i18n('include_comments'))) return settings
def get_settings(cls): """ Returns a list of settings to be used for this scraper. Settings are automatically checked for updates every time scrapers are imported The list returned by each scraper is aggregated into a big settings.xml string, and then if it differs from the current settings xml in the Scrapers category the existing settings.xml fragment is removed and replaced by the new string """ name = cls.get_name() return [ ' <setting id="%s-enable" type="bool" label="%s %s" default="true" visible="true"/>' % (name, name, i18n("enabled")), ' <setting id="%s-base_url" type="text" label=" %s" default="%s" visible="eq(-1,true)"/>' % (name, i18n("base_url"), cls.base_url), ' <setting id="%s-sub_check" type="bool" label=" %s" default="true" visible="eq(-2,true)"/>' % (name, i18n("page_existence")), ' <setting id="%s_last_results" type="number" default="0" visible="false"/>' % (name), ]
def get_settings(cls): settings = super(WSO_Scraper, cls).get_settings() name = cls.get_name() settings.append( ' <setting id="%s-max_pages" type="slider" range="1,50" option="int" label=" %s" default="1" visible="eq(-6,true)"/>' % (name, i18n('max_pages'))) return settings
def get_settings(cls): settings = super(OroroTV_Scraper, cls).get_settings() name = cls.get_name() settings.append( ' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-6,true)"/>' % (name, i18n("username")) ) settings.append( ' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-7,true)"/>' % (name, i18n("password")) ) settings.append( ' <setting id="%s-include_premium" type="bool" label=" %s" default="false" visible="eq(-8,true)"/>' % (name, i18n("include_premium")) ) return settings
def get_settings(cls): """ Returns a list of settings to be used for this scraper. Settings are automatically checked for updates every time scrapers are imported The list returned by each scraper is aggregated into a big settings.xml string, and then if it differs from the current settings xml in the Scrapers category the existing settings.xml fragment is removed and replaced by the new string """ name = cls.get_name() return [ ' <setting id="%s-enable" type="bool" label="%s %s" default="true" visible="true"/>' % (name, name, i18n('enabled')), ' <setting id="%s-base_url" type="text" label=" %s" default="%s" visible="eq(-1,true)"/>' % (name, i18n('base_url'), cls.base_url), ' <setting id="%s-sub_check" type="bool" label=" %s" default="true" visible="eq(-2,true)"/>' % (name, i18n('page_existence')), ' <setting id="%s_last_results" type="number" default="0" visible="false"/>' % (name), ]
def get_settings(cls): settings = super(DDLValley_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append( ' <setting id="%s-filter" type="slider" range="0,180" option="int" label=" %s" default="60" visible="eq(-4,true)"/>' % (name, i18n('filter_results_days'))) return settings
def resolve_link(self, link): try: headers = dict([item.split('=') for item in (link.split('|')[1]).split('&')]) for key in headers: headers[key] = urllib.unquote(headers[key]) link = link.split('|')[0] except: headers = {} html = self._http_get(link, headers=headers, cache_limit=.5) fragment = dom_parser.parse_dom(html, 'div', {'class': 'player'}) if fragment: iframe_url = dom_parser.parse_dom(fragment[0], 'iframe', ret='src') if iframe_url: headers = {'Referer': link} html = self._http_get(iframe_url[0], headers=headers, cache_limit=.5) match = re.search("window\.atob\('([^']+)", html) if match: html = base64.decodestring(match.group(1)) streams = [] for match in re.finditer('<source[^>]+src=["\']([^\'"]+)[^>]+label=[\'"]([^\'"]+)', html): streams.append(match.groups()) if len(streams) > 1: if not self.auto_pick: result = xbmcgui.Dialog().select(i18n('choose_stream'), [e[1] for e in streams]) if result > -1: return streams[result][0] else: best_stream = '' best_q = 0 for stream in streams: stream_url, label = stream if Q_ORDER[self._height_get_quality(label)] > best_q: best_q = Q_ORDER[self._height_get_quality(label)] best_stream = stream_url if best_stream: return best_stream else: return streams[0][0]
def get_settings(cls): settings = super(NoobRoom_Scraper, cls).get_settings() name = cls.get_name() settings.append(' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n('username'))) settings.append(' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n('password'))) settings.append(' <setting id="%s-include_premium" type="bool" label=" %s" default="false" visible="eq(-6,true)"/>' % (name, i18n('include_premium'))) return settings
def get_settings(cls): settings = super(RlsBB_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append(' <setting id="%s-filter" type="slider" range="0,180" option="int" label=" %s" default="60" visible="eq(-4,true)"/>' % (name, i18n('filter_results_days'))) settings.append(' <setting id="%s-select" type="enum" label=" %s" lvalues="30636|30637" default="0" visible="eq(-5,true)"/>' % (name, i18n('auto_select'))) settings.append(' <setting id="%s-include_comments" type="bool" label=" %s" default="false" visible="eq(-6,true)"/>' % (name, i18n('include_comments'))) return settings
def get_settings(cls): settings = super(DDLValley_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append(' <setting id="%s-filter" type="slider" range="0,180" option="int" label=" %s" default="60" visible="eq(-4,true)"/>' % (name, i18n('filter_results_days'))) return settings
def get_settings(cls): name = cls.get_name() try: import iflix_scraper settings = iflix_scraper.Iflix_Scraper.get_settings() offset = 5 except: settings = super(IFlix_Proxy, cls).get_settings() offset = 4 settings.append(' <setting id="%s-scraper_url" type="text" label=" %s" default="" visible="eq(-%d,true)"/>' % (name, i18n('scraper_location'), offset)) settings.append(' <setting id="%s-scraper_password" type="text" label=" %s" option="hidden" default="" visible="eq(-%d,true)"/>' % (name, i18n('scraper_key'), offset + 1)) return settings
def get_settings(cls): settings = super(WSO_Scraper, cls).get_settings() name = cls.get_name() settings.append(' <setting id="%s-max_pages" type="slider" range="1,50" option="int" label=" %s" default="1" visible="eq(-6,true)"/>' % (name, i18n('max_pages'))) return settings
def get_settings(cls): settings = super(Furk_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append(' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n('username'))) settings.append(' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n('password'))) settings.append(' <setting id="%s-result_limit" label=" %s" type="slider" default="10" range="10,100" option="int" visible="eq(-6,true)"/>' % (name, i18n('result_limit'))) return settings
def get_settings(cls): settings = super(Iflix_Scraper, cls).get_settings() name = cls.get_name() settings.append(' <setting id="%s-base_url2" type="text" label=" %s %s" default="%s" visible="eq(-4,true)"/>' % (name, i18n('tv_shows'), i18n('base_url'), cls.tv_base_url)) return settings
def get_settings(cls): settings = super(EasyNews_Scraper, cls).get_settings() settings = cls._disable_sub_check(settings) name = cls.get_name() settings.append(' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n('username'))) settings.append(' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n('password'))) return settings
def get_settings(cls): settings = super(Shush_Proxy, cls).get_settings() name = cls.get_name() settings.append(' <setting id="%s-scraper_url" type="text" label=" %s" default="" visible="eq(-4,true)"/>' % (name, i18n('scraper_location'))) settings.append(' <setting id="%s-scraper_password" type="text" label=" %s" option="hidden" default="" visible="eq(-5,true)"/>' % (name, i18n('scraper_key'))) return settings
def get_settings(cls): settings = super(IStreamHD_Scraper, cls).get_settings() name = cls.get_name() settings.append(' <setting id="%s-username" type="text" label=" %s" default="" visible="eq(-6,true)"/>' % (name, i18n('username'))) settings.append(' <setting id="%s-password" type="text" label=" %s" option="hidden" default="" visible="eq(-7,true)"/>' % (name, i18n('password'))) return settings
def get_settings(cls): settings = super(WatchHD_Scraper, cls).get_settings() name = cls.get_name() settings.append(' <setting id="%s-auto_pick" type="bool" label=" %s" default="false" visible="eq(-4,true)"/>' % (name, i18n('auto_pick'))) return settings