Пример #1
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password="",
                  server='Turbovid'):

    logger.debug("(turbovid page_url='%s')" % page_url)
    video_urls = []
    data = httptools.downloadpage(page_url).data
    data = data.replace('"', "'")
    page_url_post = scrapertools.find_single_match(
        data, "<Form method='POST' action='([^']+)'>")
    imhuman = "&imhuman=" + scrapertools.find_single_match(
        data, "name='imhuman' value='([^']+)'").replace(" ", "+")
    post = urllib.urlencode({
        k: v
        for k, v in scrapertools.find_multiple_matches(
            data, "name='([^']+)' value='([^']*)'")
    }) + imhuman

    time.sleep(6)
    data = httptools.downloadpage(page_url_post, post=post).data
    logger.debug("(data page_url='%s')" % data)
    video_urls = support.get_jwplayer_mediaurl(data, 'Turbovid')
    return video_urls
Пример #2
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info(" url=" + page_url)
    video_urls = []

    global data
    # logger.info('PAGE DATA' + data)
    # sitekey = scrapertools.find_single_match(data, 'data-sitekey="([^"]+)')
    # captcha = platformtools.show_recaptcha(sitekey, page_url) if sitekey else ''
    #
    # if captcha:
    #     data = httptools.downloadpage(page_url, post={'g-recaptcha-response': captcha}).data
    vres = scrapertools.find_multiple_matches(data, 'nowrap[^>]+>([^,]+)')
    if not vres:
        vres = scrapertools.find_multiple_matches(data, '<td>(\d+x\d+)')

    data_pack = scrapertools.find_single_match(
        data,
        "</div>\n\s*<script[^>]+>(eval.function.p,a,c,k,e,.*?)\s*</script>")
    if data_pack != "":
        from lib import jsunpack
        data = jsunpack.unpack(data_pack)

    _headers = urllib.urlencode(httptools.default_headers)
    video_urls = support.get_jwplayer_mediaurl(data, 'akvideo', onlyHttp=True)

    return sorted(
        video_urls,
        key=lambda x: int(x[0].split('x')[0])) if vres else video_urls
Пример #3
0
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
    logger.debug("url=" + page_url)
    global data
    # logger.debug(data)
    block = scrapertools.find_single_match(data, 'player.updateSrc\(([^\)]+)')
    video_urls = support.get_jwplayer_mediaurl(block, 'Onlystream', dataIsBlock=True)
    return video_urls
Пример #4
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.debug("url=" + page_url)
    global data
    video_urls = []
    code = scrapertools.find_single_match(data, 'name="code" value="([^"]+)')
    hash = scrapertools.find_single_match(data, 'name="hash" value="([^"]+)')
    post = "op=download1&code=%s&hash=%s&imhuman=Proceed+to+video" % (code,
                                                                      hash)
    data = httptools.downloadpage(
        "http://%s/playvideos/%s" %
        (servertools.get_server_host("vidtome")[0], code),
        post=post).data
    packed = scrapertools.find_multiple_matches(
        data, r'(eval\s?\(function\(p,a,c,k,e,d\).*?\n)')
    for p in packed:
        data = jsunpack.unpack(p)
        video_urls.extend(support.get_jwplayer_mediaurl(data, 'vidtome'))
        # media_url = scrapertools.find_single_match(data, r"source:\\'([^\\']+)")
        # if media_url:
        #     video_urls.append([media_url.split('.')[-1] + ' [Vidto.me]', media_url])
    return video_urls
Пример #5
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    global data
    logger.debug("url=" + page_url)
    return support.get_jwplayer_mediaurl(data, 'Vudeo')
Пример #6
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    global data
    video_urls = support.get_jwplayer_mediaurl(data, 'AvaVids')
    return video_urls
Пример #7
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info("url=" + page_url)
    data = httptools.downloadpage(page_url).data
    # logger.info(data)
    video_urls = support.get_jwplayer_mediaurl(data, 'Onlystream')
    return video_urls
Пример #8
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info("url=" + page_url)
    global data
    video_urls = support.get_jwplayer_mediaurl(data, 'Vidmoly')

    return video_urls
Пример #9
0
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
    logger.debug("(deltabit page_url='%s')" % page_url)
    global data, real_url
    post = {k: v for k, v in scrapertools.find_multiple_matches(data, "name='([^']+)' value='([^']*)'")}
    time.sleep(2.5)
    data = httptools.downloadpage(real_url, post=post).data

    # videos_packed = scrapertools.find_single_match(data, r"<script type='text/javascript'>(eval.function.p,a,c,k,e,.*?)\s*</script>")
    # video_unpacked = jsunpack.unpack(videos_packed)
    return support.get_jwplayer_mediaurl(data, 'DeltaBit', True)
Пример #10
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.debug("url=" + page_url)
    global data

    matches = support.get_jwplayer_mediaurl(data, 'VUP')
    if not matches:
        data = scrapertools.find_single_match(
            data,
            r"<script type='text/javascript'>(eval.function.p,a,c,k,e,.*?)\s*</script>"
        )
        if data:
            from lib import jsunpack
            data = jsunpack.unpack(data)
            matches = support.get_jwplayer_mediaurl(data, 'VUP')

    return matches
Пример #11
0
def play(item):
    if host in item.url:  # intercetto il server proprietario
        # if registerOrLogin():
        return support.get_jwplayer_mediaurl(
            support.httptools.downloadpage(item.url, cloudscraper=True).data,
            'Diretto')
        # else:
        #     platformtools.play_canceled = True
        #     return []
    else:
        return [item]
Пример #12
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    global data
    packed = support.match(data, patron=r'(eval\(function\(p.*?)</').match
    if packed:
        data = jsunpack.unpack(packed).replace("\\", "")
    video_urls = support.get_jwplayer_mediaurl(data, 'AvaVids')
    return video_urls
Пример #13
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.debug("url=" + page_url)
    global data
    video_urls = support.get_jwplayer_mediaurl(data, 'Vidmoly')
    for url in video_urls:
        logger.debug(url)
        url[-1] = url[-1].replace(',', '').replace('.urlset', '').replace(
            '/hls', '') + '|Referer=' + page_url

    return video_urls
Пример #14
0
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.debug("url=" + page_url)
    global data
    video_urls = []
    packed = scrapertools.find_single_match(
        data, r'(eval\s?\(function\(p,a,c,k,e,d\).*?\n)')
    data = jsunpack.unpack(packed)
    video_urls.extend(support.get_jwplayer_mediaurl(data, 'HxFile'))

    return video_urls
Пример #15
0
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
    logger.debug("url=" + page_url)
    global data
    # logger.debug(data)
    video_urls = support.get_jwplayer_mediaurl(data, 'Onlystream')
    return video_urls