# -*- coding: utf-8 -*- from ump import install install.sideloadlib("youtube-dl", "boogiekodi") import youtube_dl domain = "https://openload.co/" timeout = 60 * 60 * 24 def run(hash, ump, referer=""): ydl = youtube_dl.YoutubeDL({"quiet": True, "nocheckcertificate": True}) with ydl: result = ydl.extract_info(domain + "embed/" + hash, download=False) if 'entries' in result: # Can be a playlist or a list of videos audio = result['entries'][0] else: # Just a video audio = result return {"audio": audio["url"]}
# -*- coding: utf-8 -*- from ump import install install.sideloadlib("youtube-dl","boogiekodi") import youtube_dl timeout=60*60*24 def run(hash,ump,referer=""): ydl = youtube_dl.YoutubeDL({'format': 'bestaudio[acodec!=opus]/best',"audioformat":"vorbis","quiet":True,"nocheckcertificate":True}) with ydl: result = ydl.extract_info('http://www.youtube.com/watch?v=%s'%hash, download=False) if 'entries' in result: # Can be a playlist or a list of videos audio = result['entries'][0] else: # Just a video audio = result return {"audio":audio["url"]}
import random import urlparse from xml.dom import minidom from operator import itemgetter from datetime import date,datetime,timedelta import calendar import time import xbmc from ump import install install.sideloadlib("humanize","jmoiron") import sys print sys.path import humanize mirror="http://thetvdb.com" encoding="utf-8" apikey="C738A0A57D46E2CC" recnum=50 timeformat="%Y-%m-%d" timegap=60*60*24 def str_int(x): return int(float(x)) def str_trim(x): return x.split(" (")[0] def fix_airdate(x): try:
externals=[ ["urllib3","shazow"], ["dateutil","dateutil"], ["SocksiPy","mikedougherty"], ["six","jgraham"], ["requests","kennethreitz"], ["typing","python","master","python2"], ["setuptools","pypa"], ["dropbox-sdk-python","dropbox"], ["unidecode","iki"], ["unidecode","iki"], ["js-beautify","boogiekodi","master","python"], ] paths=[] for external in externals: paths.append(install.sideloadlib(*external,init=False)) for path in paths: if not path in sys.path:sys.path.append(path) try: from ump import prerun prerun.direct() from ump.defs import addon_ldir from ump.defs import arturi from ump import api from ump import postrun from ump import providers from ump import ui #bookmark.resolve() ump=api.ump() prerun.run(ump)
import random import urlparse from xml.dom import minidom from operator import itemgetter from datetime import date, datetime, timedelta import calendar import time import xbmc from ump import install install.sideloadlib("humanize", "jmoiron") import sys print sys.path import humanize mirror = "http://thetvdb.com" encoding = "utf-8" apikey = "C738A0A57D46E2CC" recnum = 50 timeformat = "%Y-%m-%d" timegap = 60 * 60 * 24 def str_int(x): return int(float(x)) def str_trim(x): return x.split(" (")[0]