コード例 #1
0
# -*- 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"]}
コード例 #2
0
# -*- 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"]}
コード例 #3
0
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:
コード例 #4
0
ファイル: addon.py プロジェクト: OpenELEQ/plugin.program.ump
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)
コード例 #5
0
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]