示例#1
0
import re
import HTMLParser
from elementtree.ElementTree import parse

try:
    from addon.common.addon import Addon
    from addon.common.net import Net
except:
    xbmc.log(
        'Failed to import script.module.addon.common, attempting t0mm0.common')
    xbmcgui.Dialog().ok(
        "Import Failure", "Failed to import addon.common",
        "A component needed by this addon is missing on your system",
        "Please visit www.xbmc.org for support")

addon = Addon('plugin.video.redlettermedia', sys.argv)
net = Net()

##### Queries ##########
play = addon.queries.get('play', None)
mode = addon.queries['mode']
url = addon.queries.get('url', None)
page_num = addon.queries.get('page_num', None)

addon.log('-----------------RedLetterMedia Addon Params------------------')
addon.log('--- Version: ' + str(addon.get_version()))
addon.log('--- Mode: ' + str(mode))
addon.log('--- Play: ' + str(play))
addon.log('--- URL: ' + str(url))
addon.log('--- Page: ' + str(page_num))
addon.log('---------------------------------------------------------------')
示例#2
0
import os, sys, urllib, xbmcplugin, xbmcaddon
from xbmcswift import download_page, xbmc, xbmcgui
from addon.common.addon import Addon
try:
    import json
except ImportError:
    import simplejson as json

addon_id='plugin.video.showmax'
icon = xbmc.translatePath(os.path.join('special://home/addons/' + addon_id, 'icon.png'))
fanart = xbmc.translatePath(os.path.join('special://home/addons/' + addon_id, 'fanart.jpg'))

selfAddon = xbmcaddon.Addon(id=addon_id)
addon = Addon(addon_id, sys.argv)

API_BASE = 'https://api.showmax.com/v36.0/website/catalogue/'
seriesurl = 'search?lang=eng&num=50&type=tv_series'
moviesurl = 'search?lang=eng&num=50&type=movie'
#https://api.showmax.com/v24.0/website/catalogue/search?lang=eng&num=30&start=60

def cat():
    addDir('Search','',1,icon,fanart,'')
    addDir('Series',seriesurl,2,icon,fanart,'')
    addDir('Movies',moviesurl,6,icon,fanart,'')
    addDir('Language','',3,icon,fanart,'')
    addDir('Categories','',4,icon,fanart,'')
    addDir('Sections','',5,icon,fanart,'')  

def Search():
    keyb = xbmc.Keyboard('', 'Search')
    keyb.doModal()    
示例#3
0
import sys
import simplejson as simplejson

import urllib, re
from datetime import datetime
import time
from addon.common.net import Net
from addon.common.addon import Addon
from threading import Thread
try:
    import Queue as queue
except ImportError:
    import queue
net = Net()
addon = Addon('script.module.metahandler')


class TMDB(object):
    '''
    This class performs TMDB and IMDB lookups.
    
    First call is made to TMDB by either IMDB ID or Name/Year depending on what is supplied. If movie is not found
    or if there is data missing on TMDB, another call is made to IMDB to fill in the missing information.       
    '''
    def __init__(self, api_key='', view='json', lang='en'):
        #view = yaml json xml
        self.view = view
        self.lang = lang
        self.api_key = api_key
        self.url_prefix = 'http://api.themoviedb.org/3'
示例#4
0
#from common import functions

## XBMC workaround
import _json
if not 'load' in dir(_json):
    import simplejson as _json
    
    
from library import utils


#### Constants & initialization
buggalo.SUBMIT_URL = 'http://buggalo.tvaddons.ag/submit.php'                    # Official XBMC error report generator
ADDON_NAME = 'plugin.video.XBMCKaraoke'                                         # Addon namespace
__addon__ = xbmcaddon.Addon(ADDON_NAME)                                         # Initializing addon properties
__t0mm0addon__ = Addon(ADDON_NAME, sys.argv)                                    # Initializing addon properties
__language__ = __addon__.getLocalizedString


__addonname__   = __addon__.getAddonInfo('name')                                # Humanly readable addon name
PATH = xbmc.translatePath(__addon__.getAddonInfo('path')).decode('utf-8')       # Path where the addon resides (needs absolute paths)
TEMP_DL_DIR =  'tempdl'                                                         # Temp download directory. No write permissions in special://temp so using folder inside the addon
jsonurl = 'http://api.xbmckaraoke.com/'                                         # PHP JSON website (database)
url = None                                                                      # Standard value
donotloaddir = 0                                                                # Standard value

THEME = __t0mm0addon__.get_setting('theme')                                     # Theme settings
THEME_PATH = os.path.join(PATH, 'art', 'themes', THEME)                         # Theme dir


示例#5
0
from resources.lib.modules import client,webutils
import re,sys,xbmcgui,os
from addon.common.addon import Addon
addon = Addon('plugin.video.castaway', sys.argv)

AddonPath = addon.get_path()
IconPath = AddonPath + "/resources/media/"
def icon_path(filename):
    return os.path.join(IconPath, filename)

class info():
    def __init__(self):
        self.mode = 'livetv'
        self.name = 'Livetv.sx'
        self.icon = icon_path('livetv.png')
        self.categorized = True
        self.paginated = False
        self.multilink = True

class main():
    def __init__(self):
        self.base = addon.get_setting('livetv_base')

    def categories(self):
        import requests
        self.html = requests.get(self.base + '/en/allupcoming').text
        
        cats = re.findall('<tr>\s*<[^<]*<a class="main" href="([^"]*allupcomingsports/(\d+)/)"><img[^>]*src="([^"]+)"></a></td>\s*<td align="left">[^<]*<a[^<]*<b>([^<]*)</b></a>\s*</td>\s*<td width=\d+ align="center">\s*<a [^<]*<b>\+(\d+)</b></a>\s*</td>\s*</tr>', self.html)
        cats = self.__prepare_cats(cats)
        return cats
示例#6
0
from __future__ import unicode_literals
from resources.lib.modules import client,live365
import re, urllib
import sys,xbmcgui,os
from addon.common.addon import Addon
from resources.lib.modules.log_utils import log

addon = Addon('plugin.video.croatia_od', sys.argv)

AddonPath = addon.get_path()
IconPath = AddonPath + "/resources/media/"
def icon_path(filename):
    return os.path.join(IconPath, filename)

class info():
    def __init__(self):
    	self.mode = 'live365'
        self.name = 'Sport raspored'
        self.icon = 'sport.jpg'
        self.paginated = False
        self.categorized = False
        self.multilink = False
class main():
	def __init__(self,url = ''):
		self.base = ''
		self.url = url

	

	def channels(self):
		links = live365.getLinks()
示例#7
0
try:
    import StorageServer
except:
    import storageserverdummy as StorageServer
cache = StorageServer.StorageServer('plugin.video.paktv', 6)

try:
    from sqlite3 import dbapi2 as sqlite
except:
    from pysqlite2 import dbapi2 as sqlite

try:
    from addon.common.addon import Addon
except:
    from t0mm0.common.addon import Addon
addon = Addon('plugin.video.paktv', argv=sys.argv)

__plugin__ = "paktv"
__author__ = 'Irfan Charania'
__url__ = ''
__date__ = '18-08-2013'
__version__ = '0.1.2'
__settings__ = xbmcaddon.Addon(id='plugin.video.paktv')

# allows us to get mobile version
user_agent = 'Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'

# supported by url resolver module
# match, title, host, setting id
resolvable_sites = [
    ('tube.php', '[COLOR white]Youtube[/COLOR]', 'youtube.com'),
示例#8
0
        try:
            from c_t0mm0_common_addon import Addon
        except:
            pass
##### /\ ##### Imports #####

### ############################################################################################################
### ############################################################################################################
### ############################################################################################################

### ############################################################################################################
### ############################################################################################################
### ############################################################################################################
### Plugin Settings ###

IW_addon = Addon('plugin.video.infowars', sys.argv)
addon = IW_addon
IW_domain_url = "infowars.com"
IW_addonPath = xbmc.translatePath('Infowars')
IW_addon_path_art = ""
IW_artPath = xbmc.translatePath(os.path.join(IW_addonPath, IW_addon_path_art))
IW_datapath = xbmc.translatePath(IW_addon.get_profile())
IW_artIcon = IW_addon.get_icon()
IW_artFanart = IW_addon.get_fanart()
IW_plugin = "Infowars"
IW_authors = "Prafit, Spinalcracker"
IW_credits = ""
IW_addon_id = "plugin.video.infowars"
IW_database_name = "infowars"
IW_plugin_id = "plugin.video.infowars"
IW_database_file = os.path.join(xbmc.translatePath("special://database"),
示例#9
0
#-*- coding: utf-8 -*-
#Venom.
from resources.lib.config import cConfig
from resources.lib.gui.gui import cGui
from resources.lib.gui.hoster import cHosterGui
from resources.lib.handler.inputParameterHandler import cInputParameterHandler
from resources.lib.handler.outputParameterHandler import cOutputParameterHandler
import os, sys
import urllib
import xbmc
from addon.common.addon import Addon

addon = Addon('plugin.video.vstream')

SITE_IDENTIFIER = 'cDb'
SITE_NAME = 'DB'

try:
    from sqlite3 import dbapi2 as sqlite
    cConfig().log('SQLITE 3 as DB engine')
except:
    from pysqlite2 import dbapi2 as sqlite
    cConfig().log('SQLITE 2 as DB engine')


class cDb:
    def __init__(self):

        DB = os.path.join(cConfig().getSettingCache(), 'vstream.db')

        try:
示例#10
0
文件: TMDB.py 项目: noba3/KoTos
import sys
import simplejson as simplejson 

import urllib, re
from datetime import datetime
import time
from addon.common.net import Net  
from addon.common.addon import Addon       
from threading import Thread
try:
    import Queue as queue
except ImportError:
    import queue
net = Net()
addon = Addon('plugin.video.KinoLeak')

class TMDB(object):
    '''
    This class performs TMDB and IMDB lookups.
    
    First call is made to TMDB by either IMDB ID or Name/Year depending on what is supplied. If movie is not found
    or if there is data missing on TMDB, another call is made to IMDB to fill in the missing information.       
    '''  
    
    def __init__(self, api_key='', view='json', lang='en'):
        #view = yaml json xml
        self.view = view
        self.lang = lang
        self.api_key = api_key
        self.url_prefix = 'http://api.themoviedb.org/3'
示例#11
0
import os, re, sys, urllib, cookielib, urllib2, xbmcgui, xbmcplugin
from addon.common.net import Net
from addon.common.addon import Addon

addon = Addon('plugin.video.xxtrucoxx', sys.argv)

cookie_file = os.path.join(addon.get_profile(), 'bu.cookies')

net = Net()

MAX_TRIES = 4


class billionuploads:
    def __init__(self, url, img):
        print 'Class billion url'

        cj = cookielib.LWPCookieJar()
        if os.path.exists(cookie_file):
            try:
                cj.load(cookie_file, True)
            except:
                cj.save(cookie_file, True)
        else:
            cj.save(cookie_file, True)

        normal = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
        headers = [
            ('User-Agent',
             'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0'
             ),
示例#12
0
文件: default.py 项目: koboy01/mdrepo
import urllib,urllib2,sys,re,xbmcplugin,xbmcgui,xbmcaddon,xbmc,os,base64,random,shutil
import datetime
import time
import urlresolver
from addon.common.addon import Addon
from threading import Timer
import json

PLUGIN = 'plugin.video.streamengine'
ADDON = xbmcaddon.Addon(id=PLUGIN)
ART = xbmc.translatePath(os.path.join('special://home/addons/' + PLUGIN + '/resources/art/'))
icon = xbmc.translatePath(os.path.join('special://home/addons/' + PLUGIN, 'icon.png'))
addon = Addon(PLUGIN, sys.argv)
baseurl = 'http://www.listenlive.eu'
############################################################################################################################
### ID LIKE TO SAY THAT THIS ADDON WOULD NOT OF BEEN POSSIBLE IF IT WASNT FOR THE WORK ALREADY DONE BY OTHER DEVELOPERS  ###
###     WITHOUT OUT THE GUIDE OF THEIR WORK TO HELP ME UNDERSTAND NONE OF THIS WOULD OF BEEN POSSIBLE SO I THANK YOU     ###
############################################################################################################################


def INDEX():
    link = OPEN_URL(U)
    fanart = re.compile('<fanart>(.+?)</fanart>').findall(link)[0]
    match = re.compile('<name>(.+?)</name>.+?<link>(.+?)</link>.+?<thumbnail>(.+?)</thumbnail>',re.DOTALL).findall(link)
    addLink('[B][COLOR red]TWITTER>>[/COLOR][/B]','url',3,ART+'twitter.png',fanart)
    for name, url, iconimage in match:
        addDir('[B]%s[/B]' %name,url,1,iconimage,fanart,'','','')
    addDir('[B][COLOR white]RADIO[/COLOR][/B]',baseurl+'/uk.html',4,ART+'radio.png',fanart,'','','')
    
def TWITTER():
    text = ''
示例#13
0
try:
    import StorageServer
except:
    import storageserverdummy as StorageServer
import time

# Global Stuff
addon_id = 'plugin.video.familyfunflix'
net = Net()

# Cache
cache = StorageServer.StorageServer("familyfunflix", 0)
#=====================NEW DL======================================
settings = xbmcaddon.Addon(id='plugin.video.familyfunflix')
addon = Addon('plugin.video.familyfunflix', argv=sys.argv)
mode = addon.queries['mode']
url = addon.queries.get('url', '')
name = addon.queries.get('name', '')
thumb = addon.queries.get('thumb', '')
ext = addon.queries.get('ext', '')
console = addon.queries.get('console', '')
dlfoldername = addon.queries.get('dlfoldername', '')
favtype = addon.queries.get('favtype', '')
mainimg = addon.queries.get('mainimg', '')

print 'Mode is: ' + mode
print 'Url is: ' + url
print 'Name is: ' + name
print 'Thumb is: ' + thumb
print 'Extension is: ' + ext
示例#14
0
profile_path =None# addon.get_profile()

def we_are_frozen():
    # All of the modules are built-in to the interpreter, e.g., by py2exe
    return hasattr(sys, "frozen")

def module_path():
    encoding = sys.getfilesystemencoding()
    if we_are_frozen():
        return os.path.dirname(unicode(sys.executable, encoding))
    return os.path.dirname(unicode(__file__, encoding))

try:
    addon_id = 'script.module.axel.downloader'
    from addon.common.addon import Addon
    addon = Addon('script.module.axel.downloader')
    addon_path = addon.get_path()
    profile_path = addon.get_profile()
    addon_version = addon.get_version()
except:
    profile_path=module_path()

def log(msg,n=0):
    if addon:
        addon.log(msg,n)
        #xbmc.log('%s: %s' % (addon_id, msg), n)
    else:
        print msg
    

#Create queue objects
示例#15
0
"""
import os
import time
import urllib2
import re
import HTMLParser
import socket
import xbmc
import xbmcvfs
import log_utils
from constants import VIDEO_TYPES
from constants import SRT_SOURCE
from addon.common.addon import Addon
from db_utils import DB_Connection

_SALTS = Addon('plugin.video.salts')
ADDON_PATH = _SALTS.get_path()
ICON_PATH = os.path.join(ADDON_PATH, 'icon.png')
MAX_RETRIES = 2
TEMP_ERRORS = [500, 502, 503, 504]
USER_AGENT = ("User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64)"
              "AppleWebKit/537.17 (KHTML, like Gecko)"
              "Chrome/24.0.1312.56")
BASE_URL = 'http://www.addic7ed.com'
BASE_PATH = _SALTS.get_setting('subtitle-folder')
db_connection = DB_Connection()


class SRT_Scraper():
    def __init__(self):
        pass
示例#16
0
#Custom vipplaylist by Blazetamer Ported from Mash
import urllib,urllib2,re,xbmcplugin,xbmcgui,sys,urlresolver,xbmc,os,xbmcaddon,main,math,cookielib
from resources.modules import main,resolvers
import urlresolver
import hashlib,string,md5
from addon.common.addon import Addon
from addon.common.net import Net as net
#from addon.common.net import Net
addon_id = 'plugin.video.phstreams'
selfAddon = xbmcaddon.Addon(id=addon_id)
addon = Addon('plugin.video.phstreams', sys.argv)
ADDON = xbmcaddon.Addon(id='plugin.video.phstreams')
#net = Net(http_debug=True)
#========================Alternate Param Stuff=======================
mode = addon.queries['mode']
url = addon.queries.get('url', '')
name = addon.queries.get('name', '')
thumb = addon.queries.get('thumb', '')
favtype = addon.queries.get('favtype', '')
mainimg = addon.queries.get('mainimg', '')
gomode = addon.queries.get('gomode', '')
iconimage = addon.queries.get('iconimage', '')
artwork = addon.queries.get('artwork', '')
art = addon.queries.get('art', '')
fanart = addon.queries.get('fanart', '')
console = addon.queries.get('console', '')
dlfoldername = addon.queries.get('dlfoldername', '')
ext = addon.queries.get('ext', '')
data = addon.queries.get('data', '')
labels = addon.queries.get('labels', '')
mname= addon.queries.get('mname', '')
示例#17
0
import os,sys,xbmc,xbmcplugin,xbmcaddon,xbmcgui,urllib,urllib2,re,time,datetime,string,StringIO,logging,random,array,htmllib,xbmcvfs
#import common
addon_id='plugin.video.bennu'
try:                from addon.common.addon import Addon
except:
    try:        from t0mm0.common.addon import Addon
    except: from t0mm0_common_addon import Addon
try: addon_handle=int(sys.argv[1])
except: addon_handle=0
try: addon=Addon(addon_id,sys.argv)
except: addon=Addon(addon_id,0)
try:                from addon.common.net import Net
except:
    try:        from t0mm0.common.net import Net
    except: from t0mm0_common_net import Net
net=Net()
settings=xbmcaddon.Addon(id=addon_id)
## ################################################## ##
## ################################################## ##
def gAI(t):
    try: return settings.getAddonInfo(t)
    except: return ""
def show_settings(self): settings.openSettings()
def eod(): xbmcplugin.endOfDirectory(addon_handle)
## ################################################## ##
## ################################################## ##
icon=gAI('icon'); 
fanart=gAI('fanart'); 
addon_name=gAI('name'); 
addon_path=gAI('path'); 
addon_type=gAI('type'); 
示例#18
0
import xbmcplugin
import xbmcaddon
import xbmcvfs
import log_utils
import sys
import hashlib
import urlparse
import shutil
import urllib
from constants import *
from scrapers import *  # import all scrapers into this namespace
from addon.common.addon import Addon
from trakt_api import Trakt_API
from db_utils import DB_Connection

ADDON = Addon('plugin.video.salts')
ICON_PATH = os.path.join(ADDON.get_path(), 'icon.png')
SORT_FIELDS = [(SORT_LIST[int(ADDON.get_setting('sort1_field'))],
                SORT_SIGNS[ADDON.get_setting('sort1_order')]),
               (SORT_LIST[int(ADDON.get_setting('sort2_field'))],
                SORT_SIGNS[ADDON.get_setting('sort2_order')]),
               (SORT_LIST[int(ADDON.get_setting('sort3_field'))],
                SORT_SIGNS[ADDON.get_setting('sort3_order')]),
               (SORT_LIST[int(ADDON.get_setting('sort4_field'))],
                SORT_SIGNS[ADDON.get_setting('sort4_order')]),
               (SORT_LIST[int(ADDON.get_setting('sort5_field'))],
                SORT_SIGNS[ADDON.get_setting('sort5_order')])]

username = ADDON.get_setting('username')
password = ADDON.get_setting('password')
token = ADDON.get_setting('trakt_token')
示例#19
0
from addon.common.addon import Addon  # może trzeba więcej
from common import (eod, set_view, addst, cFL, myNote)
import contextmenu
#######
try:
    from sqlite3 import dbapi2 as database
except:
    from pysqlite2 import dbapi2 as database
##########
iconFav = xbmcaddon.Addon(
    id="plugin.video.anime-iptv").getAddonInfo('path') + '/art/favorites.png'
iconSite = xbmcaddon.Addon(
    id="plugin.video.anime-iptv").getAddonInfo('path') + '/art/icon.png'
fanartSite = xbmcaddon.Addon(id="plugin.video.anime-iptv").getAddonInfo(
    'path') + '/art/japan/fanart.jpg'
_addon = Addon('plugin.video.anime-iptv', sys.argv)
_artIcon = _addon.get_icon()
_artFanart = _addon.get_fanart()
addonInfo = xbmcaddon.Addon().getAddonInfo
dataPath = xbmc.translatePath(addonInfo('profile')).decode('utf-8')
xbmcvfs.mkdir(dataPath)
favouritesFile = os.path.join(dataPath, 'favourites.db')
lang = xbmcaddon.Addon().getLocalizedString
###########


def bFL(t):
    return '[B]' + t + '[/B]'  # For Bold Text ###


def fav__COMMON__list_fetcher(site, section='', subfav=''):
示例#20
0
import xbmc
import xbmcaddon, sys
from addon.common.addon import Addon

my_addon = xbmcaddon.Addon()


addon = Addon('script.module.liveresolver', sys.argv)
version = addon.get_version()

LOGDEBUG = xbmc.LOGDEBUG
LOGERROR = xbmc.LOGERROR
LOGFATAL = xbmc.LOGFATAL
LOGINFO = xbmc.LOGINFO
LOGNONE = xbmc.LOGNONE
LOGNOTICE = xbmc.LOGNOTICE
LOGSEVERE = xbmc.LOGSEVERE
LOGWARNING = xbmc.LOGWARNING

def log(msg, level=xbmc.LOGDEBUG):
    # override message level to force logging when addon logging turned on
    if my_addon.getSetting('addon_debug') == 'true' and level == xbmc.LOGDEBUG:
        level = xbmc.LOGNOTICE
    
    try:
        if isinstance(msg, unicode):
            msg = '%s (ENCODED)' % (msg.encode('utf-8'))

        xbmc.log('Liveresolver %s | %s' % (version, msg), level)
    except Exception as e:
        try: xbmc.log('Logging Failure: %s' % (e), level)
示例#21
0
import xbmc,xbmcgui
import os
import urllib, urllib2
import cookielib
import re
import jsunpack

''' Use addon.common library for http calls '''
from addon.common.net import Net
from addon.common.addon import Addon
net = Net()

addon = Addon('plugin.video.icefilms')
datapath = addon.get_profile()

cookie_path = os.path.join(datapath, 'cookies')

USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36'
ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'

def handle_captchas(url, html, data, dialog):

    headers = {'Referer': url}

    puzzle_img = os.path.join(datapath, "solve_puzzle.png")
    
    #Check for type of captcha used
    solvemedia = re.search('<iframe src="(http://api.solvemedia.com.+?)"', html)
    recaptcha = re.search('<script type="text/javascript" src="(http://www.google.com.+?)">', html)
    numeric_captcha = re.compile("left:(\d+)px;padding-top:\d+px;'>&#(.+?);<").findall(html)    
示例#22
0
    from addon.common.addon import Addon

    from addon.common.net import Net
except:
    print 'Failed to import script.module.addon.common'
    xbmcgui.Dialog().ok(
        "Import Failure", "Failed to import addon.common",
        "A component needed by P2P Sport is missing on your system",
        "Please visit www.tvaddons.ag.com for support")

base_url = sys.argv[0]
addon_handle = int(sys.argv[1])
args = urlparse.parse_qs(sys.argv[2][1:])
params = urlparse.parse_qs(sys.argv[2][1:])

addon = Addon('plugin.video.p2psport', sys.argv)
AddonPath = addon.get_path()


def build_url(query):
    return base_url + '?' + urllib.urlencode(query)


mode = args.get('mode', None)

my_addon = xbmcaddon.Addon()

if mode is None:

    url = build_url({'mode': 'av'})
    li = xbmcgui.ListItem(
示例#23
0
import urllib
import urllib2
import time

import pyxbmct.addonwindow as pyxbmct
from addon.common.addon import Addon
from resources.libs import dateimport

dp = xbmcgui.DialogProgress()
dialog = xbmcgui.Dialog()

#############################################################
#################### SET ADDON ID ###########################
_addon_id_ = 'plugin.video.fapzone'
_self_ = xbmcaddon.Addon(id=_addon_id_)
addon = Addon(_addon_id_, sys.argv)
AddonTitle = "[COLOR darkgoldenrod]FapZone[/COLOR]"
_theme_ = _self_.getSetting('Theme')
_images_ = '/resources/' + _theme_
Addon_Image = xbmc.translatePath(
    os.path.join('special://home/addons/' + _addon_id_ + _images_,
                 'addon.png'))


def clearup():

    cachePath = xbmc.translatePath(os.path.join('special://home/cache'))
    thumbPath = xbmc.translatePath(
        os.path.join('special://profile/Thumbnails'))
    packcagesPath = xbmc.translatePath(
        os.path.join('special://home/addons/packages'))
示例#24
0
文件: teevee.py 项目: bialagary/mw
import urllib
import HTMLParser
import sys
import json
import re
import threading
import Queue

try:
    from addon.common.net import Net
    from addon.common.addon import Addon

except:
    print 'Failed to import script.module.addon.common'
    xbmcgui.Dialog().ok("TeeVee Import Failure", "Failed to import addon.common", "A component needed by TeeVee is missing on your system", "Please visit www.tvaddons.ag.com for support")
addon = Addon('plugin.video.teevee', sys.argv)


domain='http://tvonline.tw'

def read_url(url):
    net = Net()

    html=net.http_GET(url).content
    
    h = HTMLParser.HTMLParser()
    html = h.unescape(html)
    return html.encode('utf-8')


示例#25
0
import sys
import time
import datetime
import json
import random
import _strptime  # fix bug in python import
import xbmc
import xbmcgui
import xbmcplugin
from addon.common.addon import Addon
import strings

DAY_NUMS = list('0123456')
DAY_CODES = ['M', 'T', 'W', 'H', 'F', 'Sa', 'Su']

_1CH = Addon('plugin.video.1channel')
ICON_PATH = os.path.join(_1CH.get_path(), 'icon.png')
BR_VERS = [['%s.0' % i for i in xrange(18, 47)],
           [
               '37.0.2062.103', '37.0.2062.120', '37.0.2062.124',
               '38.0.2125.101', '38.0.2125.104', '38.0.2125.111',
               '39.0.2171.71', '39.0.2171.95', '39.0.2171.99', '40.0.2214.93',
               '40.0.2214.111', '40.0.2214.115', '42.0.2311.90',
               '42.0.2311.135', '42.0.2311.152', '43.0.2357.81',
               '43.0.2357.124', '44.0.2403.155', '44.0.2403.157',
               '45.0.2454.101', '45.0.2454.85', '46.0.2490.71', '46.0.2490.80',
               '46.0.2490.86', '47.0.2526.73', '47.0.2526.80', '48.0.2564.116',
               '49.0.2623.112', '50.0.2661.86'
           ], ['11.0']]
WIN_VERS = [
    'Windows NT 10.0', 'Windows NT 7.0', 'Windows NT 6.3', 'Windows NT 6.2',
示例#26
0
文件: client.py 项目: bialagary/mw
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
'''


import re,sys,urllib2,HTMLParser,random
from addon.common.addon import Addon
addon = Addon('plugin.video.nbafullgames', sys.argv)
import time
USER_AGENT = "Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko"
BR_VERS = [
    ['%s.0' % i for i in xrange(18, 42)],
    ['41.0.2228.0', '41.0.2227.1', '41.0.2227.0', '41.0.2226.0', '40.0.2214.93', '37.0.2062.124']]
WIN_VERS = ['Windows NT 6.3', 'Windows NT 6.1', 'Windows NT 6.0', 'Windows NT 5.0', 'Windows 3.1']
RAND_UAS = ['Mozilla/5.0 ({win_ver}; WOW64; rv:{br_ver}) Gecko/20100101 Firefox/{br_ver}',
            'Mozilla/5.0 ({win_ver}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{br_ver} Safari/537.36']

def _get_ua():
        try: last_gen = int(addon.get_setting('last_ua_create'))
        except: last_gen = 0
        if not addon.get_setting('current_ua') or last_gen < (time.time() - (24 * 60 * 60)):
            index = random.randrange(len(RAND_UAS))
            user_agent = RAND_UAS[index].format(win_ver=random.choice(WIN_VERS), br_ver=random.choice(BR_VERS[index]))
示例#27
0
import xbmc, xbmcgui, xbmcplugin
import urllib
import re, string

try:
    from addon.common.addon import Addon
    from addon.common.net import Net
except:
    print 'Failed to import script.module.addon.common'
    xbmcgui.Dialog().ok(
        "PFTV Import Failure", "Failed to import addon.common",
        "A component needed by PFTV is missing on your system",
        "Please visit www.xbmchub.com for support")

addon = Addon('plugin.video.projectfreetv', sys.argv)
net = Net()

try:
    from metahandler import metahandlers
except:
    print 'Failed to import script.module.metahandler'
    xbmcgui.Dialog().ok(
        "PFTV Import Failure", "Failed to import Metahandlers",
        "A component needed by PFTV is missing on your system",
        "Please visit www.xbmchub.com for support")

#Common Cache
import xbmcvfs

dbg = False  # Set to false if you don't want debugging
示例#28
0
import sys
import simplejson as simplejson

import urllib, re
from datetime import datetime
import time
from addon.common.net import Net
from addon.common.addon import Addon
from threading import Thread
try:
    import Queue as queue
except ImportError:
    import queue
net = Net()
addon = Addon('script.module.metahandler')
tmdb_common = Addon('metadata.common.themoviedb.org')


class TMDB(object):
    '''
    This class performs TMDB and OMDB lookups.
    
    First call is made to TMDB by either IMDB ID or Name/Year depending on what is supplied. If movie is not found
    or if there is data missing on TMDB, another call is made to IMDB to fill in the missing information.
    '''
    def __init__(self,
                 tmdb_api_key='',
                 omdb_api_key='',
                 view='json',
                 lang='en'):
示例#29
0
#------------------------------------------------------------
# 
#------------------------------------------------------------
# Licença: GPL (http://www.gnu.org/licenses/gpl-3.0.html)
# Baseado no código do addon youtube
#------------------------------------------------------------

import os
import sys
import time
import plugintools
import xbmc,xbmcaddon
from addon.common.addon import Addon

addonID = 'plugin.video.DocUfo'
addon = Addon(addonID, sys.argv)
local = xbmcaddon.Addon(id=addonID)
icon = local.getAddonInfo('icon')

addonfolder = local.getAddonInfo('path')
resfolder = addonfolder + '/resources/'
entryurl=resfolder+"entrada.mp4"

YOUTUBE_CHANNEL_ID = "PLAl-cwrHd5apufhLoK_PzbhXuZoljN5ED"

# Ponto de Entrada
def run():
	# Pega Parâmetros
	params = plugintools.get_params()
	
	if params.get("action") is None:
示例#30
0
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""
import sys
import xbmcgui
import time
import xbmc
import os
import utils
from trans_utils import i18n
from trakt_api import Trakt_API
from addon.common.addon import Addon

_SALTS = Addon('plugin.video.salts', sys.argv)
ICON_PATH = os.path.join(_SALTS.get_path(), 'icon.png')
use_https = _SALTS.get_setting('use_https') == 'true'
trakt_timeout = int(_SALTS.get_setting('trakt_timeout'))


def get_pin():
    AUTH_BUTTON = 200
    LATER_BUTTON = 201
    NEVER_BUTTON = 202
    ACTION_PREVIOUS_MENU = 10
    ACTION_BACK = 92
    CENTER_Y = 6
    CENTER_X = 2

    class PinAuthDialog(xbmcgui.WindowXMLDialog):