Exemple #1
0
def resolve_videto(url, referer):
    user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
    from resources.libs import jsunpack
    from t0mm0.common.addon import Addon
    addon = Addon('plugin.video.movie25', sys.argv)
    try:
        from t0mm0.common.net import Net as net
        html = net(user_agent).http_GET(url).content
        addon.log_error('Mash Up: Resolve Vidto - Requesting GET URL: ' + url)
        r = re.findall(r'<font class="err">File was removed</font>', html,
                       re.I)
        if r:
            addon.log_error('Mash Up: Resolve Vidto - File Was Removed')
            xbmc.executebuiltin("XBMC.Notification(File Not Found,Vidto,2000)")
            return False
        if not r:
            r = re.findall(
                r'(eval\(function\(p,a,c,k,e,d\)\{while.+?flvplayer.+?)</script>',
                html, re.M | re.DOTALL)
            if r:
                unpacked = jsunpack.unpack(
                    r[0]
                )  #this is where it will error, not sure if resources,libs added to os path
                r = re.findall(r'label:"\d+p",file:"(.+?)"}', unpacked)
            if not r:
                r = re.findall('type="hidden" name="(.+?)" value="(.+?)">',
                               html)
                post_data = {}
                for name, value in r:
                    post_data[name] = value
                post_data['usr_login'] = ''
                post_data['referer'] = referer
                addon.show_countdown(7, 'Please Wait', 'Resolving')
                headers = {'Referer': referer}
                html = net(user_agent).http_POST(url, post_data,
                                                 headers).content
                r = re.findall(
                    r'(eval\(function\(p,a,c,k,e,d\)\{while.+?flvplayer.+?)</script>',
                    html, re.M | re.DOTALL)
                if r:
                    unpacked = jsunpack.unpack(r[0])
                    r = re.findall(r'label:"\d+p",file:"(.+?)"}', unpacked)
                if not r:
                    r = re.findall(r"var file_link = '(.+?)';", html)
        return r[0]
    except Exception, e:
        print 'Mash Up: Resolve Vidto Error - ' + str(e)
        addon.show_small_popup(
            '[B][COLOR green]Mash Up: Vidto Resolver[/COLOR][/B]',
            'Error, Check XBMC.log for Details', 5000, elogo)
def resolve_videto(url,referer):
    user_agent='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
    from resources.libs import jsunpack
    from t0mm0.common.addon import Addon
    addon = Addon('plugin.video.movie25', sys.argv)
    try:
        from t0mm0.common.net import Net as net
        html = net(user_agent).http_GET(url).content
        addon.log_error('Mash Up: Resolve Vidto - Requesting GET URL: '+url)
        r = re.findall(r'<font class="err">File was removed</font>',html,re.I)
        if r:
            addon.log_error('Mash Up: Resolve Vidto - File Was Removed')
            xbmc.executebuiltin("XBMC.Notification(File Not Found,Vidto,2000)")
            return False
        if not r:
            r = re.findall(r'(eval\(function\(p,a,c,k,e,d\)\{while.+?flvplayer.+?)</script>'
                           ,html,re.M|re.DOTALL)
            if r:
                unpacked = jsunpack.unpack(r[0])#this is where it will error, not sure if resources,libs added to os path
                r = re.findall(r'label:"\d+p",file:"(.+?)"}',unpacked)
            if not r:
                r = re.findall('type="hidden" name="(.+?)" value="(.+?)">',html)
                post_data = {}
                for name, value in r:
                    post_data[name] = value
                post_data['usr_login'] = ''
                post_data['referer'] = referer
                addon.show_countdown(7, 'Please Wait', 'Resolving')
                headers={'Referer':referer}
                html = net(user_agent).http_POST(url,post_data,headers).content
                r = re.findall(r'(eval\(function\(p,a,c,k,e,d\)\{while.+?flvplayer.+?)</script>'
                               ,html,re.M|re.DOTALL)
                if r:
                    unpacked = jsunpack.unpack(r[0])
                    r = re.findall(r'label:"\d+p",file:"(.+?)"}',unpacked)
                if not r:
                    r = re.findall(r"var file_link = '(.+?)';",html)
        return r[0]
    except Exception, e:
        print 'Mash Up: Resolve Vidto Error - '+str(e)
        addon.show_small_popup('[B][COLOR green]Mash Up: Vidto Resolver[/COLOR][/B]','Error, Check XBMC.log for Details',
                               5000, elogo)
def resolve_mightyupload(url,referer):
    from resources.libs import jsunpack
    from t0mm0.common.addon import Addon
    addon = Addon('plugin.video.movie25', sys.argv)
    try:
        from t0mm0.common.net import Net as net
        html = net().http_GET(url).content
        addon.log_error('Mash Up: Resolve MightyUpload - Requesting GET URL: '+url)
        r = re.findall(r'name="(.+?)" value="?(.+?)"', html, re.I|re.M)
        post_data = {}
        for name, value in r:
            post_data[name] = value
        post_data['referer'] = referer
        headers={'Referer':referer}
        html = net().http_POST(url, post_data).content
        r = re.findall(r'<a href=\"(.+?)(?=\">Download the file</a>)', html)
        return r[0]
    except Exception, e:
        print 'Mash Up: Resolve MightyUpload Error - '+str(e)
        addon.show_small_popup('[B][COLOR green]Mash Up: MightyUpload Resolver[/COLOR][/B]','Error, Check XBMC.log for Details',
                               5000, elogo)
        return
Exemple #4
0
def resolve_mightyupload(url, referer):
    from resources.libs import jsunpack
    from t0mm0.common.addon import Addon
    addon = Addon('plugin.video.movie25', sys.argv)
    try:
        from t0mm0.common.net import Net as net
        html = net().http_GET(url).content
        addon.log_error(
            'Mash Up: Resolve MightyUpload - Requesting GET URL: ' + url)
        r = re.findall(r'name="(.+?)" value="?(.+?)"', html, re.I | re.M)
        post_data = {}
        for name, value in r:
            post_data[name] = value
        post_data['referer'] = referer
        headers = {'Referer': referer}
        html = net().http_POST(url, post_data).content
        r = re.findall(r'<a href=\"(.+?)(?=\">Download the file</a>)', html)
        return r[0]
    except Exception, e:
        print 'Mash Up: Resolve MightyUpload Error - ' + str(e)
        addon.show_small_popup(
            '[B][COLOR green]Mash Up: MightyUpload Resolver[/COLOR][/B]',
            'Error, Check XBMC.log for Details', 5000, elogo)
        return
Exemple #5
0
addon = Addon(addon_id, sys.argv)

    
art = main.art
error_logo = art+'/bigx.png'

try:
    import urllib, urllib2, re, string, urlparse, sys, os
    
    from t0mm0.common.net import Net
    from metahandler import metahandlers
    from sqlite3 import dbapi2 as database
    from universal import playbackengine, watchhistory
    import urlresolver
except Exception, e:
    addon.log_error(str(e))
    addon.show_small_popup('MashUP: Tv-Release','Failed To Import Modules', 5000, error_logo)
    addon.show_ok_dialog(['Failed To Import Modules','Please Post Logfile In MashUP Forum @','http://www.xbmchub.com'],
                          'MashUP: TV-Release')
net = Net()
BASEURL = 'http://www.tv-release.net/'
wh = watchhistory.WatchHistory(addon_id)

def MAINMENU():
    main.addDir('Search Tv-Release',    BASEURL+'?s=',                            1006,art+'/tvrsearch1.png')
    main.addDir('TV 480',               BASEURL+'category/tvshows/tv480p/',       1001,art+'/TV480.png')
    main.addDir('TV 720',               BASEURL+'category/tvshows/tv720p/',       1001,art+'/TV720.png')
    main.addDir('TV MP4',               BASEURL+'category/tvshows/tvmp4/',        1001,art+'/TVmp4.png')
    main.addDir('TV Xvid',              BASEURL+'category/tvshows/tvxvid/',       1001,art+'/TVxvid.png')
    main.addDir('TV Packs',             BASEURL+'tv-pack/',                       1007,art+'/TVpacks.png')
    main.addDir('TV Foreign',           BASEURL+'category/tvshows/tv-foreign/',   1001,art+'/TVforeign.png')
addon = Addon('plugin.video.letmewatchthis', sys.argv)
net = Net()

base_url = 'http://www.letmewatchthis.ch'

mode = addon.queries['mode']
play = addon.queries.get('play', None)

if play:
    try:
        addon.log_debug('fetching %s' % play)
        html = net.http_GET(play).content
    except urllib2.URLError, e:
        html = ''
        addon.log_error('got http error %d fetching %s' %
                        (e.code, web_url))
    
    links = {}
    for l in re.finditer('class="movie_version".+?quality_(.+?)>.+?url=(.+?)&domain=(.+?)&.+?"version_veiws">(.+?)</', html, re.DOTALL):
        q, url, host, views = l.groups()
        verified = l.group(0).find('star.gif') > -1
        link =  host.decode('base-64')
        if verified:
            link += ' [verified]'
        link += ' (%s)' % views.strip()
        links[url.decode('base-64')] = link
    

    playable = urlresolver.filter_urls(links.keys())
    
    if playable:
    'Horror', 'Japanese', 'Korean', 'Music', 'Musical', 'Mystery',
    'Reality-TV', 'Romance', 'Sci-Fi', 'Short', 'Sport', 'Talk-Show',
    'Thriller', 'War', 'Western', 'Zombies'
]

mode = addon.queries['mode']
play = addon.queries.get('play', None)
print play
if play:
    url = addon.queries.get('url', None)
    try:
        addon.log_debug('fetching %s' % url)
        html = net.http_GET(url).content
    except urllib2.URLError, e:
        html = ''
        addon.log_error('got http error %d fetching %s' % (e.code, url))

    #find all sources and their info
    sources = []
    for s in re.finditer(
            'class="movie_version.+?quality_(.+?)>.+?url=(.+?)' +
            '&domain=(.+?)&.+?"version_veiws">(.+?)</', html, re.DOTALL):
        q, url, host, views = s.groups()
        verified = s.group(0).find('star.gif') > -1
        title = host.decode('base-64')
        if verified:
            title += ' [verified]'
        title += ' (%s)' % views.strip()
        url = url.decode('base-64')
        hosted_media = urlresolver.HostedMediaFile(url=url, title=title)
        sources.append(hosted_media)
Exemple #8
0
          'Crime', 'Documentary', 'Drama', 'Family', 'Fantasy', 'Game-Show', 
          'History', 'Horror', 'Japanese', 'Korean', 'Music', 'Musical', 
          'Mystery', 'Reality-TV', 'Romance', 'Sci-Fi', 'Short', 'Sport', 
          'Talk-Show', 'Thriller', 'War', 'Western', 'Zombies']
          
mode = addon.queries['mode']
play = addon.queries.get('play', None)
print play
if play:
    url = addon.queries.get('url', None)
    try:
        addon.log_debug('fetching %s' % url)
        html = net.http_GET(url).content
    except urllib2.URLError, e:
        html = ''
        addon.log_error('got http error %d fetching %s' %
                        (e.code, url))
    
    #find all sources and their info
    sources = []
    for s in re.finditer('class="movie_version.+?quality_(.+?)>.+?url=(.+?)' + 
                         '&domain=(.+?)&.+?"version_veiws">(.+?)</', 
                         html, re.DOTALL):
        q, url, host, views = s.groups()
        verified = s.group(0).find('star.gif') > -1
        title = host.decode('base-64')
        if verified:
            title += ' [verified]'
        title += ' (%s)' % views.strip()
        url = url.decode('base-64')
        hosted_media = urlresolver.HostedMediaFile(url=url, title=title)
        sources.append(hosted_media)