Ejemplo n.º 1
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info()
    itemlist = []

    referer = re.sub(r"embed-|player-", "", page_url)[:-5]

    data = httptools.downloadpage(page_url, headers={'Referer': referer}).data

    if data == "File was deleted":
        return "El archivo no existe o ha sido borrado"

    packed = scrapertools.find_single_match(
        data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
    unpacked = jsunpack.unpack(packed)

    url = scrapertools.find_single_match(unpacked, '(http[^,]+\.mp4)')

    from lib import alfaresolver
    itemlist.append(
        [".mp4" + " [streamplay]",
         alfaresolver.decode_video_url(url, data)])

    itemlist.sort(key=lambda x: x[0], reverse=True)

    return itemlist
Ejemplo n.º 2
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info()
    video_urls = []

    packed = scrapertools.find_single_match(
        data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
    unpacked = jsunpack.unpack(packed)

    sources = eval(
        scrapertools.find_single_match(unpacked, "sources=(\[[^\]]+\])"))
    for video_url in sources:

        if not PY3: from lib import alfaresolver
        else: from lib import alfaresolver_py3 as alfaresolver
        video_url = alfaresolver.decode_video_url(video_url, data, 2)
        filename = scrapertools.get_filename_from_url(video_url)[-4:]
        if not video_url.endswith(".mpd"):
            video_urls.append([filename + " [streamplay]", video_url])

    video_urls.sort(key=lambda x: x[0], reverse=True)

    return video_urls
Ejemplo n.º 3
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info()
    itemlist = []

    referer = page_url.replace('iframe', 'preview')

    data = httptools.downloadpage(page_url, headers={'referer': referer}).data

    packed = scrapertools.find_single_match(
        data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
    unpacked = jsunpack.unpack(packed)

    url = scrapertools.find_single_match(unpacked,
                                         "(?:src):\\\\'([^\\\\]+.mp4)\\\\'")

    from lib import alfaresolver
    itemlist.append(
        [".mp4" + " [powvideo]",
         alfaresolver.decode_video_url(url, data)])

    itemlist.sort(key=lambda x: x[0], reverse=True)
    return itemlist
Ejemplo n.º 4
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info()
    video_urls = []

    referer = re.sub(r"embed-|player-", "", page_url)[:-5]

    data = httptools.downloadpage(page_url, headers={'Referer': referer}).data
    if data == "File was deleted":
        return "El archivo no existe o ha sido borrado"

    packed = scrapertools.find_single_match(
        data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
    unpacked = jsunpack.unpack(packed)

    sources = eval(
        scrapertools.find_single_match(unpacked, "sources=(\[[^\]]+\])"))
    for video_url in sources:

        from lib import alfaresolver
        video_url = alfaresolver.decode_video_url(video_url, data)
        filename = scrapertools.get_filename_from_url(video_url)[-4:]
        if not video_url.endswith(".mpd"):
            video_urls.append([filename + " [streamplay]", video_url])

    video_urls.sort(key=lambda x: x[0], reverse=True)

    return video_urls
Ejemplo n.º 5
0
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
    logger.info()
    itemlist = []

    packed = scrapertools.find_single_match(data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
    unpacked = jsunpack.unpack(packed)
    
    url = scrapertools.find_single_match(unpacked, "(?:src):\\\\'([^\\\\]+.mp4)\\\\'")
    from lib import alfaresolver
    url = alfaresolver.decode_video_url(url, data, 2)
    itemlist.append([".mp4" + " [powvideo]", url])

    itemlist.sort(key=lambda x: x[0], reverse=True)
    return itemlist