Exemplo n.º 1
0
def getUrl(url):
        req = mechanize.Request(url)
        req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
        response = mechanize.urlopen(req)
        link=response.read()
        response.close()
        return link				
Exemplo n.º 2
0
def getUrl(url):
    req = mechanize.Request(url)
    req.add_header(
        'User-Agent',
        ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
    )
    response = mechanize.urlopen(req)
    link = response.read()
    response.close()
    return link
Exemplo n.º 3
0
def VIDEOLINKS(url):
        content = getUrl(url)
        match=re.findall('flashvars.playlist = \'(.*?)\';', content)
        for url in match:
          url='http://ua.canna.to/canna/'+url
          content = getUrl(url)
          match=re.findall('<location>(.*?)</location>', content)
          for url in match:
            url='http://ua.canna.to/canna/'+url
            req = mechanize.Request('http://ua.canna.to/canna/single.php')
            response = mechanize.urlopen(req)
            req = mechanize.Request(url)
            req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
            response = mechanize.urlopen(req)
            response.close()
            code=response.info().getheader('Content-Location')
            url='http://ua.canna.to/canna/avzt/'+code
            print url
            print '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
            listitem = xbmcgui.ListItem(path=url)
            return xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)    
Exemplo n.º 4
0
def jahre(url):
     	mainurl='http://ua.canna.to/canna/'
        req = mechanize.Request(url)
        req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
        response = mechanize.urlopen(req)
        link=response.read().replace('\n', '')
        response.close()
        match=re.compile('<td align="left" style="border-style:solid; border-width:1px;">.*?<b>(.*?)</b>.*?<b>(.*?)</b>.*?onClick="window.open..(.*?)...CannaPowerChartsPlayer.*?</span>').findall(link)
        for title1,title2,url in match:
          url=mainurl+url
          title=title1+' '+':'+' '+title2
          title = title.replace(":", "-")
          addLink(title,url,6,icon)		  
Exemplo n.º 5
0
def Index(url):
        mainurl='http://ua.canna.to/canna/'
        req = mechanize.Request(url)
        req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
        response = mechanize.urlopen(req)
        link=response.read().replace('\n', '')
        response.close()
        match=re.findall('<tr>.*?<font>(.*?)</font>.*?class="obutton" onClick="window.open..(.*?)...CannaPowerChartsPlayer.*?</tr>', link)
        for title,url in match:
          url=mainurl+url
          print url
          print title
          title = title.replace(":", "-")
          addLink(title,url,6,icon)
Exemplo n.º 6
0
def VIDEOLINKS(url):
    content = getUrl(url)
    match = re.findall('flashvars.playlist = \'(.*?)\';', content)
    for url in match:
        url = 'http://ua.canna.to/canna/' + url
        content = getUrl(url)
        match = re.findall('<location>(.*?)</location>', content)
        for url in match:
            url = 'http://ua.canna.to/canna/' + url
            req = mechanize.Request('http://ua.canna.to/canna/single.php')
            response = mechanize.urlopen(req)
            req = mechanize.Request(url)
            req.add_header(
                'User-Agent',
                ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
            )
            response = mechanize.urlopen(req)
            response.close()
            code = response.info().getheader('Content-Location')
            url = 'http://ua.canna.to/canna/avzt/' + code
            print url
            print '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
            listitem = xbmcgui.ListItem(path=url)
            return xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
Exemplo n.º 7
0
def Index1(url):
        if 'jahrescharts' in url:
            icon = iconpath+'jc_1930.png'
        mainurl='http://ua.canna.to/canna/'
        req = mechanize.Request(url)
        req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
        response = mechanize.urlopen(req)
        link=response.read().replace('\n', '')
        response.close()
        match=re.compile('<b><font face="Arial" size="5" color="#FFCC00"><a href="(.*?)">(.*?)</a></font></b>').findall(link)
        for url, title in match:
          url=mainurl+url
          print url
          print title
          title = title.replace(":", "-")
          addDir(title,url,5,icon)		
Exemplo n.º 8
0
def jahre(url):
    mainurl = 'http://ua.canna.to/canna/'
    req = mechanize.Request(url)
    req.add_header(
        'User-Agent',
        ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
    )
    response = mechanize.urlopen(req)
    link = response.read().replace('\n', '')
    response.close()
    match = re.compile(
        '<td align="left" style="border-style:solid; border-width:1px;">.*?<b>(.*?)</b>.*?<b>(.*?)</b>.*?onClick="window.open..(.*?)...CannaPowerChartsPlayer.*?</span>'
    ).findall(link)
    for title1, title2, url in match:
        url = mainurl + url
        title = title1 + ' ' + ':' + ' ' + title2
        title = title.replace(":", "-")
        addLink(title, url, 6, icon)
Exemplo n.º 9
0
def Index(url):
    mainurl = 'http://ua.canna.to/canna/'
    req = mechanize.Request(url)
    req.add_header(
        'User-Agent',
        ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
    )
    response = mechanize.urlopen(req)
    link = response.read().replace('\n', '')
    response.close()
    match = re.findall(
        '<tr>.*?<font>(.*?)</font>.*?class="obutton" onClick="window.open..(.*?)...CannaPowerChartsPlayer.*?</tr>',
        link)
    for title, url in match:
        url = mainurl + url
        print url
        print title
        title = title.replace(":", "-")
        addLink(title, url, 6, icon)
Exemplo n.º 10
0
def Index1(url):
    if 'jahrescharts' in url:
        icon = iconpath + 'jc_1930.png'
    mainurl = 'http://ua.canna.to/canna/'
    req = mechanize.Request(url)
    req.add_header(
        'User-Agent',
        ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
    )
    response = mechanize.urlopen(req)
    link = response.read().replace('\n', '')
    response.close()
    match = re.compile(
        '<b><font face="Arial" size="5" color="#FFCC00"><a href="(.*?)">(.*?)</a></font></b>'
    ).findall(link)
    for url, title in match:
        url = mainurl + url
        print url
        print title
        title = title.replace(":", "-")
        addDir(title, url, 5, icon)
Exemplo n.º 11
0
 def getHeaderLocationUrl(self):        
     opened = mechanize.urlopen(self.__sUrl)
     return opened.geturl()