return item else: plugin.set_resolved_url(url) # url) # plugurl = 'plugin://plugin.video.live.streamspro/?url={0}'.format(urllib.quote_plus(url)) # item = ListItem.from_dict(path=plugurl) # item.add_stream_info('video', stream_values={}) # item.set_is_playable(True) # plugin.notify(msg="RESOLVE FAIL: {0}".format(url.split('.', 1)[-1]),title="Trying {0}".format(item.path.split('.', 1)[-1]), delay=2000) return None if __name__ == '__main__': # if plugin.get_setting('debugon', converter=bool): web_pdb.set_trace() viewmode = 0 hostname = '' hostname = plugin.get_setting('setHostname') if len(hostname) > 1: hostname = hostname.strip() hostname = hostname.strip('/') if str(hostname).startswith('http'): __BASEURL__ = hostname else: __BASEURL__ = 'https://' + hostname ws.BASEURL = __BASEURL__ ws.Plugin = plugin ws.Remove = removeshow ws.Episode = episode ws.Category = category ws.Save = saveshow ws.Autoplay = autoplay ws.Play = play
item.add_stream_info('video', stream_values={}) item.set_is_playable(True) plugin.play_video(item) return None except: plugin.notify(msg="Failed: {0}".format(resolved.partition('.')[-1]), title="YOUTUBE-DL", delay=1000) if len(resolved) > 1: plugin.set_resolved_url(resolved) item = ListItem.from_dict(path=resolved) plugin.play_video(item) return None else: plugin.set_resolved_url(url) plugin.play_video(url) return None if __name__ == '__main__': hostname = '' hostname = plugin.get_setting('setHostname') if len(hostname) > 1: hostname = hostname.strip() hostname = hostname.strip('/') if str(hostname).startswith('http'): __BASEURL__ = hostname else: __BASEURL__ = 'https://' + hostname plugin.run() plugin.set_content('episodes') plugin.set_view_mode(0)
oauth_token='RBesLWIhoxC1StezFBQ5EZf7A9EkdHvvuQQWyLpyy8vdj8aqvU', oauth_secret='GQAEtLIJuPojQ8fojZrh0CFBzUbqQu8cFH5ejnChQBl4ljJB4a', api_key='5wEwFCF0rbiHXYZQQeQnNetuwZMmIyrUxIePLqUMcZlheVXwc4') try: tclient = TumblrRestClient(**TUMBLRAUTH) if tclient is not None: info = tclient.info() print info APIOK = True except: tclient = None APIOK = False print "Couldn't get TumblrRestClient object" try: if tclient is None and not APIOK: otoken = plugin.get_setting('oauth_token') osecret = plugin.get_setting('oauth_secret') TUMBLRAUTH.update({'oauth_token': otoken, 'oauth_secret': osecret}) tclient = TumblrRestClient(**TUMBLRAUTH) info = tclient.info() if info is not None and 'user' in info.keys(): APIOK = True else: APIOK = False except: APIOK = False try: TUMBLRAUTH = getoauth() tclient = TumblrRestClient(**TUMBLRAUTH) info = tclient.info() if info is not None and info.get('user', None) is not None:
return litems @plugin.route('/search/') def search(): """ Search currently searches just spankwire but want to expand this search over the search performed in site() to run each of those searches for every site and return all results in this one section for now i have removed the route to this search until I can finish the global search. """ urlbase = "http://www.spankwire.com/api/HubTrafficApiCall?" caturl = urlbase + "data=getCategoriesList&output=json&segment=gay" catvidsurl = urlbase + "data=searchVideos&output=json&thumbsize=small&count=100&segment=gay&search=&tags=&category={0}" searchurl = urlbase + "data=searchVideos&output=json&thumbsize=small&count=100&segment=gay&search={0}&tags=&category=" thumbcaturl = "http://cdn2.static.spankwire.com/images/category/Gay/{0}.jpg" searchtxt = '' searchtxt = plugin.get_setting('lastsearch') searchtxt = plugin.keyboard(searchtxt, 'Search Spankwire', False) searchquery = searchtxt.replace(' ', '+') plugin.set_setting(key='lastsearch', val=searchtxt) url = searchurl.format(searchquery) itemslist = parseVideosUrl(url) viditems = makeVideoItems(itemslist) return viditems if __name__ == '__main__': plugin.run() viewmode = int(plugin.get_setting('viewmode')) if viewmode is None: viewmode = 500 plugin.set_view_mode(viewmode)
FIELD_NAME_ROOT_FMT = ("ctl00$ContentPlaceHolder1$DropZoneMainContent$columnDisplay$" "ctl00$controlcolumn$ctl{:02d}$WidgetHost$WidgetHost_widget$") PAGINATION_FMT = "Pagination1${}" SEARCH_NAV_FMT = FIELD_NAME_ROOT_FMT.format(0) + PAGINATION_FMT PLAYER_VARS_RE = re.compile("kWidget.embed\((.*?)\)", re.MULTILINE|re.DOTALL) STADIUM_THUMB = HOST + ("/uploadedImages/Shared_Assets/Images/News_images/SEASON_16-17/" "July_2016/NDP_update/west_elevation_instory.jpg") plugin = Plugin() form_data = plugin.get_storage('form_data') debug = plugin.get_setting('debug', bool) def kodi_version(): query = dict(jsonrpc='2.0', method='Application.GetProperties', params=dict(properties=['version', 'name']), id=1) response = json.loads(xbmc.executeJSONRPC(json.dumps(query))) return response['result']['version'] def log(msg): if debug: plugin.log.info(msg) def error_report_yes(exc):
# -*- coding: utf-8 -*- # https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-web-api-v7-reference from kodiswift import Plugin, xbmc from urllib import quote_plus as Quote, unquote_plus as Unquote import webutil import sys, os, os.path as path import json plugin = Plugin() APIKEY = plugin.get_setting('apikey') tplWho = '( jovenes OR chavalo OR chavo OR amigo OR hombre OR hermano OR novinho OR chico OR chavalito )' tplWhat = '( mecos OR masturbo OR masturbandose OR batendo OR paja OR follando OR cogiendo OR cojiendo OR sobarse OR punheta OR verga OR lefa )' tplWhere = '( flagra OR flagrou OR trabajo OR publico OR biblioteca OR aula OR "en clase" OR escuela OR omnibus OR autobus OR viajandor )' tplWank = '( wank OR wanking OR wanked OR stroke OR stroking OR jerk OR jack OR m********e OR masturbating OR cumming OR cum OR jackoff OR jerkoff OR handjob )' searchq = tplWhere + ' AND ' + tplWhat + ' ' + tplWho cpath = path.join(xbmc.translatePath('special://userdata'), 'cookies.lwp') dl = webutil.DemystifiedWebRequest(cookiePath=cpath) __addondir__ = xbmc.translatePath(plugin.addon.getAddonInfo('path')) __resdir__ = os.path.join(__addondir__, 'resources') __imgdir__ = os.path.join(__resdir__, 'images') __imgsearch__ = os.path.join(__imgdir__, 'search.png') __imgnext__ = os.path.join(__imgdir__, 'next.png') __imgback__ = os.path.join(__imgdir__, 'back.png') __imgtumblr__ = os.path.join(__imgdir__, 'tumblr.png') @plugin.route('/') def index(): itemnew = { 'label': 'New Bing Video Search!', 'icon': __imgsearch__, 'thumbnail': __imgsearch__,
'User-Agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.123 Safari/537.36&' 'Host=lic.drmtoday.com&' 'Origin=https://mubi.com&' 'Referer=https://mubi.com/&' 'Sec-Fetch-Dest=empty&' 'Sec-Fetch-Mode=cors&' 'Sec-Fetch-Site=cross-site&' 'Accept-Encoding=gzip, deflate, br&' 'Accept-Language=en-US,en;q=0.9&' 'Connection=keep-alive&' 'Content-Type=application/json;charset=utf-8' ) plugin = Plugin(PLUGIN_NAME, PLUGIN_ID, __file__) if not plugin.get_setting("username") or not plugin.get_setting("password"): plugin.open_settings() mubi = Mubi(plugin.get_setting("username", unicode), plugin.get_setting("password", unicode)) @plugin.route('/') def index(): films = mubi.now_showing() items = [{ 'label': film.title, 'is_playable': True, 'path': plugin.url_for('play_film', identifier=film.mubi_id), 'thumbnail': film.artwork, 'info': film.metadata._asdict() } for film in films]
# -*- coding: utf-8 -*- # https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-web-api-v7-reference from kodiswift import Plugin, xbmc, ListItem from urllib import quote_plus as Quote, unquote_plus as Unquote import webutil import sys, os, os.path as path import json plugin = Plugin() APIKEY=plugin.get_setting('apikey') tplWho = '( jovenes OR chavalo OR chavo OR amigo OR hombre OR hermano OR novinho OR chico OR chavalito )' tplWhat = '( mecos OR masturbo OR masturbandose OR batendo OR paja OR follando OR cogiendo OR cojiendo OR sobarse OR punheta OR verga OR lefa OR mear OR pipi )' tplWhere = '( flagra OR flagrou OR trabajo OR publico OR biblioteca OR aula OR atrapado OR escuela OR omnibus OR autobus OR viajandor )' tplWank = '( wank OR wanking OR wanked OR stroke OR stroking OR jerk OR jack OR m********e OR masturbating OR cumming OR cum OR jackoff OR jerkoff OR handjob )' searchq = tplWhere + ' AND ' + tplWhat + ' ' + tplWho cpath = path.join(xbmc.translatePath('special://userdata'), 'cookies.lwp') dl = webutil.DemystifiedWebRequest(cookiePath=cpath) __addondir__ = xbmc.translatePath(plugin.addon.getAddonInfo('path')) __resdir__ = os.path.join(__addondir__, 'resources') __imgdir__ = os.path.join(__resdir__, 'images') __imgsearch__ = os.path.join(__imgdir__, 'search.png') __imgfav__ = os.path.join(__imgdir__, 'fav.png') __imgnext__ = os.path.join(__imgdir__, 'next.png') __imgback__ = os.path.join(__imgdir__, 'back.png') __imgtumblr__ = os.path.join(__imgdir__, 'tumblr.png') @plugin.route('/') def index(): itemnew = { 'label': 'New Bing Video Search!', 'icon': __imgsearch__, 'thumbnail': __imgsearch__, 'path': plugin.url_for(endpoint=query, searchfor='NEW'),
#!/usr/bin/python # # CONFIG FILE # #Modules necessaires : IrcLib / BeautifulSoup / Python2.X # # all options and parameters for your implementation of # this project are here # # IRC bot # from xbmcswift2 import Plugin from kodiswift import Plugin plugin = Plugin() ircDefaultChannel = "#test" ircDefaultNickname = "Gunther" ircDefaultServer = "irc.freenode.net" ircDefaultNumPaquet = 1 ircDefaultNomRobot = "Grabator" ircDefaultSecondChannel = "" ircDefaultPort = 6667 ircDefaultVersion = "HexChat 2.9.5" ircTempoAvantDL = 5.2 # Search parameters defaultUrl = "http://ixirc.com/?q=" # Downloads downloadPath = plugin.get_setting('xg_dl_path')
# -*- coding: utf-8 -*- import os import time from resources.lib.utils import * from kodiswift import Plugin, xbmcgui, xbmc plugin = Plugin() last_category = None _lang = plugin.get_string os_name = get_os_name() os_is_android = None NATIVE_PATH = xbmc.translatePath(plugin.addon.getAddonInfo('path')) DEFAULT_API_URL = plugin.get_setting('api_url', str) # try: # import hashlib # CACHE_ID_SUFFIX = '-' + hashlib.md5(CUSTOM_API_URL.encode('utf-8')).hexdigest() # except Exception as ex: # log("SiTo.tv hashlib error: %s" % ex, level=xbmc.LOGERROR) # CACHE_ID_SUFFIX = '-' + CUSTOM_API_URL.replace(':', '_').replace('/', '-').replace('\\', '-') # sito.log = log # sito.notice = notice # sito.image_resource_url = image_resource_url # sito.url_for = plugin.url_for # sito.store = plugin.get_storage('basic_cache' + CACHE_ID_SUFFIX) # sito.requests_cache = plugin.get_storage('requests_cache', ttl=60*4) #
plugin.notify(msg="Failed: {0}".format(resolved.partition('.')[-1]), title="YOUTUBE-DL", delay=1000) if len(resolved) > 1: plugin.set_resolved_url(resolved) item = ListItem.from_dict(path=resolved) return item else: plugin.set_resolved_url(url) # url) return None if __name__ == '__main__': # if plugin.get_setting('debugon', converter=bool): web_pdb.set_trace() viewmode = 0 hostname = '' hostname = plugin.get_setting('setHostname') if len(hostname) > 1: hostname = hostname.strip() hostname = hostname.strip('/') if str(hostname).startswith('http'): __BASEURL__ = hostname else: __BASEURL__ = 'https://' + hostname ws.BASEURL = __BASEURL__ ws.Plugin = plugin ws.Remove = removeshow ws.Episode = episode ws.Category = category ws.Save = saveshow ws.Autoplay = autoplay ws.Play = play
plugin.play_video(item) return None except: plugin.notify(msg="Failed: {0}".format(resolved.partition('.')[-1]), title="YOUTUBE-DL", delay=1000) if len(resolved) > 1: plugin.set_resolved_url(resolved) item = ListItem.from_dict(path=resolved) plugin.play_video(item) return None else: plugin.set_resolved_url(url) plugin.play_video(url) return None if __name__ == '__main__': hostname = '' hostname = plugin.get_setting('setHostname') if len(hostname) > 1: hostname = hostname.strip() hostname = hostname.strip('/') if str(hostname).startswith('http'): __BASEURL__ = hostname else: __BASEURL__ = 'https://' + hostname plugin.run() plugin.set_content('episodes') plugin.set_view_mode(0)
vidurl = m6.pop() xbmc.log("MATCH 6 = {0}".format(vidurl)) #matches = re.compile("videoUrl: '([^']*)',", re.I + re.M + re.S + re.U).findall(vidhtml)[0] #vidurl = matches #vidurl = matches.split(' ', 1)[0].strip('"') #xbmc.Player().play(vidurl) if vidurl is not None: xbmc.log("PLAY matches vidpage: \n{0}".format(vidurl)) vli = ListItem(label=title, label2=url, icon=video, thumbnail=video, path=vidurl) vli.playable = True plugin.set_resolved_url(vli) plugin.play_video(vli) # return plugin.play_video(vli) else: xbmc.log("FAILED to resolve url to movie file. {0}".format(url)) except: xbmc.log("failed to resolve url to movie file.") # return [] #xbmc.Player().play(vidurl, vli.as_xbmc_listitem()) #return plugin.set_resolved_url(vli) #vidurl = "http://cdn2b.public.spankwire.phncdn.com/novideo.flv?ir=1953&rs=2000&s=1466541100&e=1466569900&h=7b4efeb5378339681485187a1755b859" #vidurl = "http://cdn2b.download.spankwire.phncdn.com/201606/20/5174721/mp4_high_5174721.mp4?ir=1953&rs=2000&s=1466541100&e=1466569900&h=d6cf4fe17926353e9b03150bee167908" if __name__ == '__main__': plugin.run() viewmode = int(plugin.get_setting('viewmode')) if viewmode is None: viewmode = 500 plugin.set_view_mode(viewmode) #xbmc.executebuiltin("Container.SetViewMode({0})".format(viewMode))