Exemple #1
0
def PromptFile(url):
    if url.startswith('promptfile://'): url=url.replace('promptfile://','http://www.promptfile.com/l/')
    if url.startswith('http://promptfile.com/'): url=url.replace('http://promptfile.com/','http://www.promptfile.com/')
    if ('http://www.promptfile.com/l/' not in url): return url
    try:
        html=main.nolines(net.http_GET(url,headers={'User-Agent':UA}).content).replace('/>','/\n\r>').replace('</div>','</div\n\r>')
        #if '<h3 class="error_msg_title">Invalid or Deleted File.</h3>' in html: return "[error]  This file doesn't exist, or has been removed."
        r=re.search('<a href="(http\D*://.+?)" class="green_btn download_btn">\s*Download File\s*</a',html)
        if not r:
            data={}; r=re.findall(r'<input type="hidden" name="(chash)" value="(.*?)"',html)
            for name,value in r: data[name]=value
            html=main.nolines(net.http_POST(url,data,headers={'User-Agent':UA,'Referer':url}).content).replace('</div>','</div\n\r>')
            r=re.search('<a href="(http\D*://.+?)" class="green_btn download_btn">Download File</a',html)
        if r: return urllib.unquote_plus(r.group(1))
        else: return url+'#[error]r'
    except: return url+'#[error]exception'
Exemple #2
0
def MrFile_dot_me(url):
    if url.startswith('mrfile://'): url=url.replace('mrfile://','http://mrfile.me/')
    if ('http://mrfile.me/' not in url) and ('http://www.mrfile.me/' not in url): return url
    try:
        html=net.http_GET(url).content
        #if '<h3 class="error_msg_title">Invalid or Deleted File.</h3>' in html: return "[error]  This file doesn't exist, or has been removed."
        data={}; r=re.findall(r'<input type="hidden"\s*name="(.+?)"\s*value="(.*?)"',html)
        for name,value in r: data[name]=value
        data['referer']=''; data['submit']='Click here to Continue'; data['method_free']=''; data['method_premium']=''; 
        html=main.nolines(net.http_POST(url,data).content).replace('<br><br><br>','<br>\r\a<br>\n<br>')
        r=re.search('<a href="(http\D*://.+?\.zip)">Download .+?\.zip</a>\s*</span',html)
        if r: return urllib.unquote_plus(r.group(1))
        else: return url+'#[error]r'
    except: return url+'#[error]exception'
Exemple #3
0
def HELPCATEGORIES():
    if ((XBMCversion['Ver'] in ['','']) or (int(XBMCversion['two']) < 12)) and (settings.getSetting('bypass-xbmcversion')=='false'):
        eod(); addon.show_ok_dialog(["Compatibility Issue: Outdated Kodi Setup","Please upgrade to a newer version of XBMC first!","Visit %s for Support!"%SiteDomain],title="XBMC "+XBMCversion['Ver'],is_error=False); DoA('Back'); 
    else:
        if main.isFile(LocalLinks)==True: link=main.nolines(main.FileOpen(LocalLinks))
        else: link=main.OPEN_URL(LinksUrl).replace('\n','').replace('\r','').replace('\a','')
        match=re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?escription="(.+?)".+?ype="(.+?)"').findall(link)
        for name,url,iconimage,fanart,description,filetype in match:
            #if 'status' in filetype:
                #main.addHELPDir(name,url,'wizardstatus',iconimage,fanart,description,filetype)
            #else:    
                main.addHELPDir(name,url,'helpwizard',iconimage,fanart,description,filetype)
        CustomUrl=settings.getSetting('custom-url')
        try:
            if (len(CustomUrl) > 10) and ('://' in CustomUrl):
                main.addHELPDir('Custom Url[CR](Addon Settings)',CustomUrl,'helpwizard',main.AddonIcon,main.AddonFanart,"Custom url found in addon settings.","main") ## For Testing to test a url with a FileHost.
        except: pass
        #main.addHELPDir('Testing','http://www.firedrive.com/file/################','helpwizard',iconimage,fanart,description,filetype) ## For Testing to test a url with a FileHost.
        main.AUTO_VIEW('movies')
Exemple #4
0
def HELPCATEGORIES():
    if ((XBMCversion['Ver'] in ['','']) or (int(XBMCversion['two']) < 12)) and (settings.getSetting('bypass-xbmcversion')=='false'):
        eod(); addon.show_ok_dialog(["Compatibility Issue: Outdated Kodi Setup","Please upgrade to a newer version of XBMC first!","Visit %s for Support!"%SiteDomain],title="XBMC "+XBMCversion['Ver'],is_error=False); DoA('Back'); 
    else:
        if main.isFile(LocalLinks)==True: link=main.nolines(main.FileOpen(LocalLinks))
        else: link=main.OPEN_URL(LinksUrl).replace('\n','').replace('\r','').replace('\a','')
        match=re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?escription="(.+?)".+?ype="(.+?)"').findall(link)
        for name,url,iconimage,fanart,description,filetype in match:
            #if 'status' in filetype:
                #main.addHELPDir(name,url,'wizardstatus',iconimage,fanart,description,filetype)
            #else:    
                main.addHELPDir(name,url,'helpwizard',iconimage,fanart,description,filetype)
        CustomUrl=settings.getSetting('custom-url')
        try:
            if (len(CustomUrl) > 10) and ('://' in CustomUrl):
                main.addHELPDir('Custom Url[CR](Addon Settings)',CustomUrl,'helpwizard',main.AddonIcon,main.AddonFanart,"Custom url found in addon settings.","main") ## For Testing to test a url with a FileHost.
        except: pass
        #main.addHELPDir('Testing','http://www.firedrive.com/file/################','helpwizard',iconimage,fanart,description,filetype) ## For Testing to test a url with a FileHost.
        main.AUTO_VIEW('movies')