예제 #1
0
def VIDEOLINK(url, name):
    print "URL: " + url
    data = getUrlData(url)
    match = re.compile(
        '<p>(.+?)</p>\s*.*<p style=.*><.*mce_(src|href)=\"(.+?)\".*').findall(
            data)
    if (len(match) < 1) or (match[0][0].find('<br /></p><p><br />') != -1):
        items = servertools.findvideo(data)
        for server, adresa in items:
            adresa = adresa.replace('&amp;', '&')
            server = server.lower()

            if server == "youtube":
                YOUTUBE_LINK(adresa, name + ' - UKAZKA')

            if server == "24video":
                VIDEONET_LINK(adresa, name)
            if server == "videobb":
                VIDEOBB_LINK(adresa, name)
            if server == "novamov":
                NOVAMOV_LINK(adresa, name)
            if server == "vk":
                VKCOM_LINK(adresa, name)
            if server == "videomail":
                VIDEOMAIL_LINK(adresa, name)
            if server == "iframe":
                IFRAME_LINK(adresa, name)
            #else:
            #	print "VIDEOLINK URL: "+url
    else:
        for item in match:
            url = item[len(item) - 1].replace('&amp;', '&')
            try:
                n = item[2]
                name = item[0]
            except:
                pass
            if url.find('youtube.com') != -1:
                YOUTUBE_LINK(url, name)
            elif url.find('24video.net') != -1:
                match = re.search(
                    'flash[v|V]ars.*\"id=(?P<id>.+?)&amp;idHtml=(?P<html>.+?)&amp;.*rootUrl=(?P<url>.+?)&amp;',
                    data, re.IGNORECASE | re.DOTALL)
                VIDEONET_LINK(('%s%s%s?mode=play' %
                               (match.group('url'), match.group('html'),
                                match.group('id'))), name)
            elif url.find('videobb.com') != -1:
                VIDEOBB_LINK(url, name)
            elif url.find('novamov.com') != -1:
                NOVAMOV_LINK(url, name)
            elif url.find('vk.com') != -1 or url.find('vkontakte.ru') != -1:
                VKCOM_LINK(url, name)
            else:
                print "VIDEOLINK URL: " + url
예제 #2
0
def VIDEOLINK(url, name):
    print "URL: " + url
    data = getUrlData(url)
    match = re.compile('<p>(.+?)</p>\s*.*<p style=.*><.*mce_(src|href)="(.+?)".*').findall(data)
    if (len(match) < 1) or (match[0][0].find("<br /></p><p><br />") != -1):
        items = servertools.findvideo(data)
        for server, adresa in items:
            adresa = adresa.replace("&amp;", "&")
            server = server.lower()

            if server == "youtube":
                YOUTUBE_LINK(adresa, name + " - UKAZKA")

            if server == "24video":
                VIDEONET_LINK(adresa, name)
            if server == "videobb":
                VIDEOBB_LINK(adresa, name)
            if server == "novamov":
                NOVAMOV_LINK(adresa, name)
            if server == "vk":
                VKCOM_LINK(adresa, name)
            if server == "videomail":
                VIDEOMAIL_LINK(adresa, name)
            if server == "iframe":
                IFRAME_LINK(adresa, name)
                # else:
                # 	print "VIDEOLINK URL: "+url
    else:
        for item in match:
            url = item[len(item) - 1].replace("&amp;", "&")
            try:
                n = item[2]
                name = item[0]
            except:
                pass
            if url.find("youtube.com") != -1:
                YOUTUBE_LINK(url, name)
            elif url.find("24video.net") != -1:
                match = re.search(
                    'flash[v|V]ars.*"id=(?P<id>.+?)&amp;idHtml=(?P<html>.+?)&amp;.*rootUrl=(?P<url>.+?)&amp;',
                    data,
                    re.IGNORECASE | re.DOTALL,
                )
                VIDEONET_LINK(("%s%s%s?mode=play" % (match.group("url"), match.group("html"), match.group("id"))), name)
            elif url.find("videobb.com") != -1:
                VIDEOBB_LINK(url, name)
            elif url.find("novamov.com") != -1:
                NOVAMOV_LINK(url, name)
            elif url.find("vk.com") != -1 or url.find("vkontakte.ru") != -1:
                VKCOM_LINK(url, name)
            else:
                print "VIDEOLINK URL: " + url
예제 #3
0
def IFRAME_LINK(url,name):
        try:
                data  = getUrlData(__baseurl__+url)
                match = re.compile('<a href="(.+?)"').findall(data)
                data  = getUrlData(match[0])
                match = re.compile('location\.replace\("(.+?)"\)').findall(data)
                data  = getUrlData(match[0])
                items = servertools.findvideo(data)
                for server,adresa in items:
                        adresa = adresa.replace('&amp;','&')
                        server = server.lower()
                        if server == "youtube":
                                YOUTUBE_LINK(adresa,name)
        except:
                print "IFRAME URL: "+url
예제 #4
0
def IFRAME_LINK(url, name):
    try:
        data = getUrlData(__baseurl__ + url)
        match = re.compile('<a href="(.+?)"').findall(data)
        data = getUrlData(match[0])
        match = re.compile('location\.replace\("(.+?)"\)').findall(data)
        data = getUrlData(match[0])
        items = servertools.findvideo(data)
        for server, adresa in items:
            adresa = adresa.replace('&amp;', '&')
            server = server.lower()
            if server == "youtube":
                YOUTUBE_LINK(adresa, name)
    except:
        print "IFRAME URL: " + url