Exemple #1
0
                    **kwargs
                )
                return
            elif re.search(r'vine\.co', iframe_url):
                vine_download(
                    iframe_url, output_dir, merge=merge, info_only=info_only,
                    **kwargs
                )
                return
            else:
                iframe_html = get_content(iframe_url)
                real_url = match1(iframe_html, r'<source src="([^"]*)"')

    title = unescape(
        match1(
            html, r'<meta property="og:title" content="([^"]*)" />'
        ) or match1(
            html, r'<meta property="og:description" content="([^"]*)" />'
        ) or match1(html, r'<title>([^<\n]*)') or url.split('/')[4]
    ).replace('\n', '')

    type, ext, size = url_info(real_url)

    print_info(site_info, title, type, size)
    if not info_only:
        download_urls([real_url], title, ext, size, output_dir, merge=merge)


download = tumblr_download
download_playlist = playlist_not_supported(site_info)
Exemple #2
0
                    download_urls([candy['url']],
                                  candy['title'],
                                  ext,
                                  size,
                                  output_dir=output_dir,
                                  merge=merge,
                                  faker=True)
        return

    else:
        # direct download
        filename = parse.unquote(url.split('/')[-1])
        title = '.'.join(filename.split('.')[:-1])
        ext = filename.split('.')[-1]
        _, _, size = url_info(url, faker=True)
        print_info(site_info, title, ext, size)
        if not info_only:
            download_urls([url],
                          title,
                          ext,
                          size,
                          output_dir=output_dir,
                          merge=merge,
                          faker=True)
        return


site_info = None
download = universal_download
download_playlist = playlist_not_supported('universal')