VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 42 of 42
Thread
  1. Originally Posted by LZAA View Post
    Url?
    It's an embedded video in a password protected site, what link are you asking for?
    Quote Quote  
  2. Originally Posted by giovannirescia View Post
    Originally Posted by LZAA View Post
    Url?
    It's an embedded video in a password protected site, what link are you asking for?
    apply filter player.vimeo.com/video and send its raw response result
    Quote Quote  
  3. Originally Posted by giovannirescia View Post
    Originally Posted by larley View Post
    Maybe look at this:
    https://github.com/DevLARLEY/vimeo-downloader
    Both scripts create HLS manifests that can be played/converted using VLC.
    tried your script and got "Unable to send request" on both links.
    Did you enter the .json URL from the network tab? That error means that the program got a status code that isn't 200. try editing the script by adding your headers from curlconverter in the send_request method. Copy the request as cURL in your browser as POSIX/bash and paste it on curlconverter.com
    Quote Quote  
  4. vimeo downloader for v2 playlist.json link

    inside bin directory, put these files:
    yt_dlp.exe
    ffmpeg.exe

    HTML Code:
    vimeo downloader (main directory)
    ├── bin
    │   ├── yt_dlp.exe
    │   └── ffmpeg.exe
    └── vimeo_downloader.py
    #can be change in script:
    # 'yes' for auto best selection or 'no' for manual selection
    default:
    auto_best = 'yes'

    Image
    [Attachment 80416 - Click to enlarge]


    Code:
    import subprocess
    import requests
    import shutil
    import os
    import re
    
    # 'yes' for auto best selection or 'no' for manual selection
    auto_best = 'yes'
    
    dirs_to_cr = [
        'bin', 'Downloads/Finished/Vimeo', 'Downloads/Temp'
    ]
    
    for directory_path in dirs_to_cr:
        os.makedirs(directory_path, exist_ok=True)
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    yt_dl = '.\\bin\\yt-dlp.exe'
    ffm = '.\\bin\\ffmpeg.exe'
    
    yt_dl_file_exists = os.path.isfile(yt_dl)
    if yt_dl_file_exists:
        pass
    else:
        print(f"The file {yt_dl} does not exist.")
        print(f'inside bin directory, put these files: \n yt_dl.exe\n ffmpeg.exe')
        ex_it = input('Press Enter to exit....')
        exit()
    
    print('''
    v2 playlist.json link
    ''')
    
    link = input('Link: ')
    
    try:
        bef_v2 = re.findall(r'(https:.*exp.*hmac.*)/v2/playlist', link)[0].strip()
    except IndexError:
        print(' [ERROR] this is not a v2 playlist.json link!')
        ex_it = input('\nEnter to close..')
        exit()    
    
    video_title = input('\nVideo title here: ')
    
    headers = {
        'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
    }
    
    resp = requests.get(link, headers=headers).json()
    
    video_data = [
        {
            'id': re.match(r'(.*?)-', video['id']).group(1),
            'width': video['width'],
            'height': video['height'],
            'video_res': f"{video['width']}x{video['height']}",
            'video_link': f"{bef_v2}/parcel/video/{re.match(r'(.*?)-', video['id']).group(1)}.mp4"
        }
        for video in resp['video']
    ]
    
    audio_data = [
        {
            'id': re.match(r'(.*?)-', audio['id']).group(1),
            'codecs': audio['codecs'],
            'bitrate': audio['bitrate'],
            'audio_details': f"{audio['codecs']}, {audio['bitrate']}",
            'audio_link': f"{bef_v2}/parcel/audio/{re.match(r'(.*?)-', audio['id']).group(1)}.mp4"
        }
        for audio in resp['audio']
    ]
    
    video_data.sort(key=lambda x: (x['width'], x['height']), reverse=True)
    audio_data.sort(key=lambda x: x['bitrate'], reverse=True)
    
    sel_vid_name = None
    sel_aud_name = None
    
    options = []
    
    if auto_best == 'no':
        print("\nAvailable options:")
    
    for idx, video in enumerate(video_data, start=1):
        video_id = video['id']
        video_res = video['video_res']
        options.append((idx, f"video | {video_res} | {video_id}", video['video_link']))
        
        if auto_best == 'no':
            print(f"{idx} - video | {video_res}")
    
    for idx, audio in enumerate(audio_data, start=len(video_data) + 1):
        audio_id = audio['id']
        audio_details = audio['audio_details']
        options.append((idx, f"audio | {audio_details} | {audio_id}", audio['audio_link']))
        
        if auto_best == 'no':
            print(f"{idx} - audio | {audio_details}")
    
    if auto_best == 'yes':
        sel_vid_name = video_data[0]['video_res']
        selected_video_link = video_data[0]['video_link']
        sel_aud_name = audio_data[0]['audio_details']
        selected_audio_link = audio_data[0]['audio_link']
        print(f"\nbest video: {sel_vid_name}")
        print(f"best audio: {sel_aud_name}\n")
        
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
        print()
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if auto_best == 'no':
        selection = input("Write numbers here (one video, one audio e.g; 1 4): ").split()
        selection = [int(num) for num in selection]
        
        selection_str = ', '.join(map(str, selection))
        
        print(f'\nSelected: {selection_str}')
        
        for num in selection:
            for option in options:
                if option[0] == num:
                    print(f"\nProcessing: {num}")
                    if "video" in option[1]:
                        sel_vid_name = option[1].split('|')[1].strip()
                        selected_video_link = option[2]
                        print(f"{sel_vid_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
                    elif "audio" in option[1]:
                        sel_aud_name = option[1].split('|')[1].strip()
                        selected_audio_link = option[2]
                        print(f"{sel_aud_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if sel_vid_name and sel_aud_name:
        output_x = f'Downloads\\Finished\\Vimeo\\{sel_vid_name}_{video_title}.mp4'
        
        print('\n [INFO] ffmpeg process started...\n')
        subprocess.run([ffm, '-v', 'quiet', '-stats', '-y', '-i', f'{temp_dir}\\{sel_vid_name}.mp4', '-i', f'{temp_dir}\\{sel_aud_name}.aac', '-c', 'copy', output_x])
    else:
        print("\n [ERROR] Need video and audio picked..")
    
    print(f'\n [INFO] file moved here:\n {output_x}')
    
    print('\n [INFO] Deleting unnecessary files..')
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    print(' [INFO] All done.')
    ex_it = input('\nEnter to close..')
    exit()
    Quote Quote  
  5. Good Job! @sk8ordi3
    Quote Quote  
  6. Originally Posted by sk8ordi3 View Post
    vimeo downloader for v2 playlist.json link

    inside bin directory, put these files:
    yt_dlp.exe
    ffmpeg.exe

    HTML Code:
    vimeo downloader (main directory)
    ├── bin
    │   ├── yt_dlp.exe
    │   └── ffmpeg.exe
    └── vimeo_downloader.py
    #can be change in script:
    # 'yes' for auto best selection or 'no' for manual selection
    default:
    auto_best = 'yes'

    Image
    [Attachment 80416 - Click to enlarge]


    Code:
    import subprocess
    import requests
    import shutil
    import os
    import re
    
    # 'yes' for auto best selection or 'no' for manual selection
    auto_best = 'yes'
    
    dirs_to_cr = [
        'bin', 'Downloads/Finished/Vimeo', 'Downloads/Temp'
    ]
    
    for directory_path in dirs_to_cr:
        os.makedirs(directory_path, exist_ok=True)
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    yt_dl = '.\\bin\\yt-dlp.exe'
    ffm = '.\\bin\\ffmpeg.exe'
    
    yt_dl_file_exists = os.path.isfile(yt_dl)
    if yt_dl_file_exists:
        pass
    else:
        print(f"The file {yt_dl} does not exist.")
        print(f'inside bin directory, put these files: \n yt_dl.exe\n ffmpeg.exe')
        ex_it = input('Press Enter to exit....')
        exit()
    
    print('''
    v2 playlist.json link
    ''')
    
    link = input('Link: ')
    
    try:
        bef_v2 = re.findall(r'(https:.*exp.*hmac.*)/v2/playlist', link)[0].strip()
    except IndexError:
        print(' [ERROR] this is not a v2 playlist.json link!')
        ex_it = input('\nEnter to close..')
        exit()    
    
    video_title = input('\nVideo title here: ')
    
    headers = {
        'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
    }
    
    resp = requests.get(link, headers=headers).json()
    
    video_data = [
        {
            'id': re.match(r'(.*?)-', video['id']).group(1),
            'width': video['width'],
            'height': video['height'],
            'video_res': f"{video['width']}x{video['height']}",
            'video_link': f"{bef_v2}/parcel/video/{re.match(r'(.*?)-', video['id']).group(1)}.mp4"
        }
        for video in resp['video']
    ]
    
    audio_data = [
        {
            'id': re.match(r'(.*?)-', audio['id']).group(1),
            'codecs': audio['codecs'],
            'bitrate': audio['bitrate'],
            'audio_details': f"{audio['codecs']}, {audio['bitrate']}",
            'audio_link': f"{bef_v2}/parcel/audio/{re.match(r'(.*?)-', audio['id']).group(1)}.mp4"
        }
        for audio in resp['audio']
    ]
    
    video_data.sort(key=lambda x: (x['width'], x['height']), reverse=True)
    audio_data.sort(key=lambda x: x['bitrate'], reverse=True)
    
    sel_vid_name = None
    sel_aud_name = None
    
    options = []
    
    if auto_best == 'no':
        print("\nAvailable options:")
    
    for idx, video in enumerate(video_data, start=1):
        video_id = video['id']
        video_res = video['video_res']
        options.append((idx, f"video | {video_res} | {video_id}", video['video_link']))
        
        if auto_best == 'no':
            print(f"{idx} - video | {video_res}")
    
    for idx, audio in enumerate(audio_data, start=len(video_data) + 1):
        audio_id = audio['id']
        audio_details = audio['audio_details']
        options.append((idx, f"audio | {audio_details} | {audio_id}", audio['audio_link']))
        
        if auto_best == 'no':
            print(f"{idx} - audio | {audio_details}")
    
    if auto_best == 'yes':
        sel_vid_name = video_data[0]['video_res']
        selected_video_link = video_data[0]['video_link']
        sel_aud_name = audio_data[0]['audio_details']
        selected_audio_link = audio_data[0]['audio_link']
        print(f"\nbest video: {sel_vid_name}")
        print(f"best audio: {sel_aud_name}\n")
        
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
        print()
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if auto_best == 'no':
        selection = input("Write numbers here (one video, one audio e.g; 1 4): ").split()
        selection = [int(num) for num in selection]
        
        selection_str = ', '.join(map(str, selection))
        
        print(f'\nSelected: {selection_str}')
        
        for num in selection:
            for option in options:
                if option[0] == num:
                    print(f"\nProcessing: {num}")
                    if "video" in option[1]:
                        sel_vid_name = option[1].split('|')[1].strip()
                        selected_video_link = option[2]
                        print(f"{sel_vid_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
                    elif "audio" in option[1]:
                        sel_aud_name = option[1].split('|')[1].strip()
                        selected_audio_link = option[2]
                        print(f"{sel_aud_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if sel_vid_name and sel_aud_name:
        output_x = f'Downloads\\Finished\\Vimeo\\{sel_vid_name}_{video_title}.mp4'
        
        print('\n [INFO] ffmpeg process started...\n')
        subprocess.run([ffm, '-v', 'quiet', '-stats', '-y', '-i', f'{temp_dir}\\{sel_vid_name}.mp4', '-i', f'{temp_dir}\\{sel_aud_name}.aac', '-c', 'copy', output_x])
    else:
        print("\n [ERROR] Need video and audio picked..")
    
    print(f'\n [INFO] file moved here:\n {output_x}')
    
    print('\n [INFO] Deleting unnecessary files..')
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    print(' [INFO] All done.')
    ex_it = input('\nEnter to close..')
    exit()
    thanks! I tried this but unfortunately I am getting access denied, line 54 returns

    <HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>\n \nYou don\'t have permission to access "http://vod-adaptive-ak.vimeocdn.com/exp=172002119 0%7eacl=%2Fbebfe42e-1d86-43e2-b093-c2c31bf0112d%2F %2A%7ehmac=076cced3a865ef8390b79f57cbfb0fda0849fd2 3a42b82d9c6515a700ec40ac7/bebfe42e-1d86-43e2-b093- c2c31bf0112d/v2/playlist/av/primary/playlist.json? " on this server.<P>\nReference #18.3c8328b3.1720125598.14d7a911\n<P>https://error s.edgesuite.net/18.3c8328b3.1720125598.14d7a911</P>\n</BODY>\n</HTML>\n'
    is there any way to bypass it/send credentials?
    Quote Quote  
  7. This's exactly why my script is failing as i wrote in my previous post.
    Quote Quote  
  8. Originally Posted by giovannirescia View Post
    Originally Posted by sk8ordi3 View Post
    vimeo downloader for v2 playlist.json link

    inside bin directory, put these files:
    yt_dlp.exe
    ffmpeg.exe

    HTML Code:
    vimeo downloader (main directory)
    ├── bin
    │   ├── yt_dlp.exe
    │   └── ffmpeg.exe
    └── vimeo_downloader.py
    #can be change in script:
    # 'yes' for auto best selection or 'no' for manual selection
    default:
    auto_best = 'yes'

    Image
    [Attachment 80416 - Click to enlarge]


    Code:
    import subprocess
    import requests
    import shutil
    import os
    import re
    
    # 'yes' for auto best selection or 'no' for manual selection
    auto_best = 'yes'
    
    dirs_to_cr = [
        'bin', 'Downloads/Finished/Vimeo', 'Downloads/Temp'
    ]
    
    for directory_path in dirs_to_cr:
        os.makedirs(directory_path, exist_ok=True)
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    yt_dl = '.\\bin\\yt-dlp.exe'
    ffm = '.\\bin\\ffmpeg.exe'
    
    yt_dl_file_exists = os.path.isfile(yt_dl)
    if yt_dl_file_exists:
        pass
    else:
        print(f"The file {yt_dl} does not exist.")
        print(f'inside bin directory, put these files: \n yt_dl.exe\n ffmpeg.exe')
        ex_it = input('Press Enter to exit....')
        exit()
    
    print('''
    v2 playlist.json link
    ''')
    
    link = input('Link: ')
    
    try:
        bef_v2 = re.findall(r'(https:.*exp.*hmac.*)/v2/playlist', link)[0].strip()
    except IndexError:
        print(' [ERROR] this is not a v2 playlist.json link!')
        ex_it = input('\nEnter to close..')
        exit()    
    
    video_title = input('\nVideo title here: ')
    
    headers = {
        'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
    }
    
    resp = requests.get(link, headers=headers).json()
    
    video_data = [
        {
            'id': re.match(r'(.*?)-', video['id']).group(1),
            'width': video['width'],
            'height': video['height'],
            'video_res': f"{video['width']}x{video['height']}",
            'video_link': f"{bef_v2}/parcel/video/{re.match(r'(.*?)-', video['id']).group(1)}.mp4"
        }
        for video in resp['video']
    ]
    
    audio_data = [
        {
            'id': re.match(r'(.*?)-', audio['id']).group(1),
            'codecs': audio['codecs'],
            'bitrate': audio['bitrate'],
            'audio_details': f"{audio['codecs']}, {audio['bitrate']}",
            'audio_link': f"{bef_v2}/parcel/audio/{re.match(r'(.*?)-', audio['id']).group(1)}.mp4"
        }
        for audio in resp['audio']
    ]
    
    video_data.sort(key=lambda x: (x['width'], x['height']), reverse=True)
    audio_data.sort(key=lambda x: x['bitrate'], reverse=True)
    
    sel_vid_name = None
    sel_aud_name = None
    
    options = []
    
    if auto_best == 'no':
        print("\nAvailable options:")
    
    for idx, video in enumerate(video_data, start=1):
        video_id = video['id']
        video_res = video['video_res']
        options.append((idx, f"video | {video_res} | {video_id}", video['video_link']))
        
        if auto_best == 'no':
            print(f"{idx} - video | {video_res}")
    
    for idx, audio in enumerate(audio_data, start=len(video_data) + 1):
        audio_id = audio['id']
        audio_details = audio['audio_details']
        options.append((idx, f"audio | {audio_details} | {audio_id}", audio['audio_link']))
        
        if auto_best == 'no':
            print(f"{idx} - audio | {audio_details}")
    
    if auto_best == 'yes':
        sel_vid_name = video_data[0]['video_res']
        selected_video_link = video_data[0]['video_link']
        sel_aud_name = audio_data[0]['audio_details']
        selected_audio_link = audio_data[0]['audio_link']
        print(f"\nbest video: {sel_vid_name}")
        print(f"best audio: {sel_aud_name}\n")
        
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
        print()
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if auto_best == 'no':
        selection = input("Write numbers here (one video, one audio e.g; 1 4): ").split()
        selection = [int(num) for num in selection]
        
        selection_str = ', '.join(map(str, selection))
        
        print(f'\nSelected: {selection_str}')
        
        for num in selection:
            for option in options:
                if option[0] == num:
                    print(f"\nProcessing: {num}")
                    if "video" in option[1]:
                        sel_vid_name = option[1].split('|')[1].strip()
                        selected_video_link = option[2]
                        print(f"{sel_vid_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
                    elif "audio" in option[1]:
                        sel_aud_name = option[1].split('|')[1].strip()
                        selected_audio_link = option[2]
                        print(f"{sel_aud_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if sel_vid_name and sel_aud_name:
        output_x = f'Downloads\\Finished\\Vimeo\\{sel_vid_name}_{video_title}.mp4'
        
        print('\n [INFO] ffmpeg process started...\n')
        subprocess.run([ffm, '-v', 'quiet', '-stats', '-y', '-i', f'{temp_dir}\\{sel_vid_name}.mp4', '-i', f'{temp_dir}\\{sel_aud_name}.aac', '-c', 'copy', output_x])
    else:
        print("\n [ERROR] Need video and audio picked..")
    
    print(f'\n [INFO] file moved here:\n {output_x}')
    
    print('\n [INFO] Deleting unnecessary files..')
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    print(' [INFO] All done.')
    ex_it = input('\nEnter to close..')
    exit()
    thanks! I tried this but unfortunately I am getting access denied, line 54 returns

    <HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>\n \nYou don\'t have permission to access "http://vod-adaptive-ak.vimeocdn.com/exp=1720021190%7eacl=%2Fbebfe42e-1d86-43e2-b093-c2c31bf0112d%2F%2A%7ehmac=076cced3a865ef8390b79f57 cbfb0fda0849fd23a42b82d9c6515a700ec40ac7/bebfe42e-1d86-43e2-b093-c2c31bf0112d/v2/playlist/av/primary/playlist.json?" on this server.<P>\nReference #18.3c8328b3.1720125598.14d7a911\n<P>https://errors.edgesuite.net/18.3c8328b3.1720125598.14d7a911</P>\n</BODY>\n</HTML>\n'
    is there any way to bypass it/send credentials?
    share raw response result of
    Code:
    player.vimeo.com/video
    Quote Quote  
  9. Originally Posted by slayer36 View Post
    Originally Posted by giovannirescia View Post
    Originally Posted by sk8ordi3 View Post
    vimeo downloader for v2 playlist.json link

    inside bin directory, put these files:
    yt_dlp.exe
    ffmpeg.exe

    HTML Code:
    vimeo downloader (main directory)
    ├── bin
    │   ├── yt_dlp.exe
    │   └── ffmpeg.exe
    └── vimeo_downloader.py
    #can be change in script:
    # 'yes' for auto best selection or 'no' for manual selection
    default:
    auto_best = 'yes'

    Image
    [Attachment 80416 - Click to enlarge]


    Code:
    import subprocess
    import requests
    import shutil
    import os
    import re
    
    # 'yes' for auto best selection or 'no' for manual selection
    auto_best = 'yes'
    
    dirs_to_cr = [
        'bin', 'Downloads/Finished/Vimeo', 'Downloads/Temp'
    ]
    
    for directory_path in dirs_to_cr:
        os.makedirs(directory_path, exist_ok=True)
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    yt_dl = '.\\bin\\yt-dlp.exe'
    ffm = '.\\bin\\ffmpeg.exe'
    
    yt_dl_file_exists = os.path.isfile(yt_dl)
    if yt_dl_file_exists:
        pass
    else:
        print(f"The file {yt_dl} does not exist.")
        print(f'inside bin directory, put these files: \n yt_dl.exe\n ffmpeg.exe')
        ex_it = input('Press Enter to exit....')
        exit()
    
    print('''
    v2 playlist.json link
    ''')
    
    link = input('Link: ')
    
    try:
        bef_v2 = re.findall(r'(https:.*exp.*hmac.*)/v2/playlist', link)[0].strip()
    except IndexError:
        print(' [ERROR] this is not a v2 playlist.json link!')
        ex_it = input('\nEnter to close..')
        exit()    
    
    video_title = input('\nVideo title here: ')
    
    headers = {
        'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
    }
    
    resp = requests.get(link, headers=headers).json()
    
    video_data = [
        {
            'id': re.match(r'(.*?)-', video['id']).group(1),
            'width': video['width'],
            'height': video['height'],
            'video_res': f"{video['width']}x{video['height']}",
            'video_link': f"{bef_v2}/parcel/video/{re.match(r'(.*?)-', video['id']).group(1)}.mp4"
        }
        for video in resp['video']
    ]
    
    audio_data = [
        {
            'id': re.match(r'(.*?)-', audio['id']).group(1),
            'codecs': audio['codecs'],
            'bitrate': audio['bitrate'],
            'audio_details': f"{audio['codecs']}, {audio['bitrate']}",
            'audio_link': f"{bef_v2}/parcel/audio/{re.match(r'(.*?)-', audio['id']).group(1)}.mp4"
        }
        for audio in resp['audio']
    ]
    
    video_data.sort(key=lambda x: (x['width'], x['height']), reverse=True)
    audio_data.sort(key=lambda x: x['bitrate'], reverse=True)
    
    sel_vid_name = None
    sel_aud_name = None
    
    options = []
    
    if auto_best == 'no':
        print("\nAvailable options:")
    
    for idx, video in enumerate(video_data, start=1):
        video_id = video['id']
        video_res = video['video_res']
        options.append((idx, f"video | {video_res} | {video_id}", video['video_link']))
        
        if auto_best == 'no':
            print(f"{idx} - video | {video_res}")
    
    for idx, audio in enumerate(audio_data, start=len(video_data) + 1):
        audio_id = audio['id']
        audio_details = audio['audio_details']
        options.append((idx, f"audio | {audio_details} | {audio_id}", audio['audio_link']))
        
        if auto_best == 'no':
            print(f"{idx} - audio | {audio_details}")
    
    if auto_best == 'yes':
        sel_vid_name = video_data[0]['video_res']
        selected_video_link = video_data[0]['video_link']
        sel_aud_name = audio_data[0]['audio_details']
        selected_audio_link = audio_data[0]['audio_link']
        print(f"\nbest video: {sel_vid_name}")
        print(f"best audio: {sel_aud_name}\n")
        
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
        print()
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if auto_best == 'no':
        selection = input("Write numbers here (one video, one audio e.g; 1 4): ").split()
        selection = [int(num) for num in selection]
        
        selection_str = ', '.join(map(str, selection))
        
        print(f'\nSelected: {selection_str}')
        
        for num in selection:
            for option in options:
                if option[0] == num:
                    print(f"\nProcessing: {num}")
                    if "video" in option[1]:
                        sel_vid_name = option[1].split('|')[1].strip()
                        selected_video_link = option[2]
                        print(f"{sel_vid_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
                    elif "audio" in option[1]:
                        sel_aud_name = option[1].split('|')[1].strip()
                        selected_audio_link = option[2]
                        print(f"{sel_aud_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if sel_vid_name and sel_aud_name:
        output_x = f'Downloads\\Finished\\Vimeo\\{sel_vid_name}_{video_title}.mp4'
        
        print('\n [INFO] ffmpeg process started...\n')
        subprocess.run([ffm, '-v', 'quiet', '-stats', '-y', '-i', f'{temp_dir}\\{sel_vid_name}.mp4', '-i', f'{temp_dir}\\{sel_aud_name}.aac', '-c', 'copy', output_x])
    else:
        print("\n [ERROR] Need video and audio picked..")
    
    print(f'\n [INFO] file moved here:\n {output_x}')
    
    print('\n [INFO] Deleting unnecessary files..')
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    print(' [INFO] All done.')
    ex_it = input('\nEnter to close..')
    exit()
    thanks! I tried this but unfortunately I am getting access denied, line 54 returns

    <HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>\n \nYou don\'t have permission to access "http://vod-adaptive-ak.vimeocdn.com/exp=1720021190%7eacl=%2Fbebfe42e-1d86-43e2-b093-c2c31bf0112d%2F%2A%7ehmac=076cced3a865ef8390b79f57 cbfb0fda0849fd23a42b82d9c6515a700ec40ac7/bebfe42e-1d86-43e2-b093-c2c31bf0112d/v2/playlist/av/primary/playlist.json?" on this server.<P>\nReference #18.3c8328b3.1720125598.14d7a911\n<P>https://errors.edgesuite.net/18.3c8328b3.1720125598.14d7a911</P>\n</BODY>\n</HTML>\n'
    is there any way to bypass it/send credentials?
    share raw response result of
    Code:
    player.vimeo.com/video
    Code:
    requests.get('http://player.vimeo.com/video', headers=headers).content
    Out[13]: b'<!DOCTYPE html>\n<html lang="">\n<head>\n<meta charset="utf-8">\n<title>Sorry</title>\n<style>\n    body, html {\n        width: 100%;\n        height: 100%;\n        margin: 0;\n        padding: 0;\n        background-color: #151515;\n        overflow: hidden;\n    }\n\n    body {\n        text-align: center;\n        font-family: \'Helvetica Neue\', \'Helvetica\', \'Arial\', sans-serif;\n        color: white;\n    }\n\n\t#horizon {\n        display: table;\n        height: 100%;\n        position: static;\n        width: 100%;\n    }\n\n\t#sun {\n        display: table-cell;\n        vertical-align: middle;\n        position: static;\n        margin: 0 auto;\n    }\n\n    code {\n      background-color: #302f2f;\n      border-radius: 5px;\n      display: inline-block;\n      width: 45%;\n      margin: 10px auto;\n      padding: 5px;\n      text-wrap: wrap;\n    }\n\n    h1, p, a {\n        margin: 0 auto;\n        max-width: 80%;\n    }\n\n    h1, p {\n        display: block;\n    }\n\n    h1 {\n        font-size: 48px;\n        margin-bottom: 5px;\n    }\n\n    p {\n        font-size: 24px;\n        max-width: 475px;\n    }\n\n    a {\n        color: #4bf;\n        text-decoration: none;\n    }\n\n    a[role="button"] {\n        margin-top: 15px;\n        display: inline-block;\n        color: #fff;\n        font-weight: bold;\n        padding: 10px 20px;\n        border-radius: 5px;\n        background: #4bf;\n        text-shadow: none;\n        font-size: 16px;\n    }\n\n    a[role="button"]:active {\n        background: #3795cc;\n    }\n\n    .smaller p {\n        font-size: 18px;\n    }\n\n    .smaller h1 {\n        font-size: 42px;\n    }\n\n    @media (max-width: 499px) {\n        p {\n            font-size: 16px;\n            line-height: 1.4;\n            max-width: 290px;\n        }\n\n        a[role="button"] {\n            font-size: 16px;\n            padding: 7px 15px;\n        }\n\n        .smaller p {\n            font-size: 15px;\n        }\n\n        .smaller a[role="button"] {\n            font-size: 14px;\n        }\n\n        .smaller h1 {\n            font-size: 36px;\n        }\n    }\n\n    @media (max-width: 300px) {\n        h1 {\n            font-size: 36px;\n        }\n\n        p {\n            font-size: 14px;\n            line-height: 1.4;\n            max-width: 250px;\n        }\n\n        a[role="button"] {\n            margin-top: 10px;\n            font-size: 14px;\n        }\n\n        .smaller p {\n            font-size: 12px;\n        }\n\n        .smaller a[role="button"] {\n            font-size: 12px;\n        }\n\n        .smaller h1 {\n            font-size: 28px;\n        }\n    }\n</style>\n\n</head>\n  <body class="">\n\t<div id="horizon">\n\t\t<div id="sun">\n      <h1>Sorry</h1>\n      <p>We\xe2\x80\x99re having a little trouble.</p>\n      \n      \n    </div>\n  </div>\n    <script>\n        \n        window.parent.postMessage({\n            event: \'error\',\n            data: {\n              message: \'We\xe2\x80\x99re having a little trouble.\',\n              name: \'NotFoundError\',\n              method: \'ready\',\n            },\n        }, document.referrer || \'*\');\n    </script>\n</body>\n'
    Quote Quote  
  10. guys, don't Quote a hundreds of lines script post...


    i can't get such an Access Denied error
    only with links that expired..


    in the developer tab on the playlist.json GET I don't see anything special, but you might have it..

    which can check here:
    Image
    [Attachment 80431 - Click to enlarge]


    after that, if we can see something different than maybe can improve the script..


    after
    Copy as cURL (bash)

    if you have a cookies or credentials in it
    then change that, but not the structure!
    Last edited by sk8ordi3; 4th Jul 2024 at 19:54.
    Quote Quote  
  11. Originally Posted by giovannirescia View Post
    Originally Posted by slayer36 View Post
    Originally Posted by giovannirescia View Post
    Originally Posted by sk8ordi3 View Post
    vimeo downloader for v2 playlist.json link

    inside bin directory, put these files:
    yt_dlp.exe
    ffmpeg.exe

    HTML Code:
    vimeo downloader (main directory)
    ├── bin
    │   ├── yt_dlp.exe
    │   └── ffmpeg.exe
    └── vimeo_downloader.py
    #can be change in script:
    # 'yes' for auto best selection or 'no' for manual selection
    default:
    auto_best = 'yes'

    Image
    [Attachment 80416 - Click to enlarge]


    Code:
    import subprocess
    import requests
    import shutil
    import os
    import re
    
    # 'yes' for auto best selection or 'no' for manual selection
    auto_best = 'yes'
    
    dirs_to_cr = [
        'bin', 'Downloads/Finished/Vimeo', 'Downloads/Temp'
    ]
    
    for directory_path in dirs_to_cr:
        os.makedirs(directory_path, exist_ok=True)
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    yt_dl = '.\\bin\\yt-dlp.exe'
    ffm = '.\\bin\\ffmpeg.exe'
    
    yt_dl_file_exists = os.path.isfile(yt_dl)
    if yt_dl_file_exists:
        pass
    else:
        print(f"The file {yt_dl} does not exist.")
        print(f'inside bin directory, put these files: \n yt_dl.exe\n ffmpeg.exe')
        ex_it = input('Press Enter to exit....')
        exit()
    
    print('''
    v2 playlist.json link
    ''')
    
    link = input('Link: ')
    
    try:
        bef_v2 = re.findall(r'(https:.*exp.*hmac.*)/v2/playlist', link)[0].strip()
    except IndexError:
        print(' [ERROR] this is not a v2 playlist.json link!')
        ex_it = input('\nEnter to close..')
        exit()    
    
    video_title = input('\nVideo title here: ')
    
    headers = {
        'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
    }
    
    resp = requests.get(link, headers=headers).json()
    
    video_data = [
        {
            'id': re.match(r'(.*?)-', video['id']).group(1),
            'width': video['width'],
            'height': video['height'],
            'video_res': f"{video['width']}x{video['height']}",
            'video_link': f"{bef_v2}/parcel/video/{re.match(r'(.*?)-', video['id']).group(1)}.mp4"
        }
        for video in resp['video']
    ]
    
    audio_data = [
        {
            'id': re.match(r'(.*?)-', audio['id']).group(1),
            'codecs': audio['codecs'],
            'bitrate': audio['bitrate'],
            'audio_details': f"{audio['codecs']}, {audio['bitrate']}",
            'audio_link': f"{bef_v2}/parcel/audio/{re.match(r'(.*?)-', audio['id']).group(1)}.mp4"
        }
        for audio in resp['audio']
    ]
    
    video_data.sort(key=lambda x: (x['width'], x['height']), reverse=True)
    audio_data.sort(key=lambda x: x['bitrate'], reverse=True)
    
    sel_vid_name = None
    sel_aud_name = None
    
    options = []
    
    if auto_best == 'no':
        print("\nAvailable options:")
    
    for idx, video in enumerate(video_data, start=1):
        video_id = video['id']
        video_res = video['video_res']
        options.append((idx, f"video | {video_res} | {video_id}", video['video_link']))
        
        if auto_best == 'no':
            print(f"{idx} - video | {video_res}")
    
    for idx, audio in enumerate(audio_data, start=len(video_data) + 1):
        audio_id = audio['id']
        audio_details = audio['audio_details']
        options.append((idx, f"audio | {audio_details} | {audio_id}", audio['audio_link']))
        
        if auto_best == 'no':
            print(f"{idx} - audio | {audio_details}")
    
    if auto_best == 'yes':
        sel_vid_name = video_data[0]['video_res']
        selected_video_link = video_data[0]['video_link']
        sel_aud_name = audio_data[0]['audio_details']
        selected_audio_link = audio_data[0]['audio_link']
        print(f"\nbest video: {sel_vid_name}")
        print(f"best audio: {sel_aud_name}\n")
        
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
        print()
        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if auto_best == 'no':
        selection = input("Write numbers here (one video, one audio e.g; 1 4): ").split()
        selection = [int(num) for num in selection]
        
        selection_str = ', '.join(map(str, selection))
        
        print(f'\nSelected: {selection_str}')
        
        for num in selection:
            for option in options:
                if option[0] == num:
                    print(f"\nProcessing: {num}")
                    if "video" in option[1]:
                        sel_vid_name = option[1].split('|')[1].strip()
                        selected_video_link = option[2]
                        print(f"{sel_vid_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_vid_name}.mp4', selected_video_link])
                    elif "audio" in option[1]:
                        sel_aud_name = option[1].split('|')[1].strip()
                        selected_audio_link = option[2]
                        print(f"{sel_aud_name}\n")
                        
                        subprocess.run([yt_dl, '-N', '16', '--no-warning', '--no-check-certificate', '-o', f'{temp_dir}\\{sel_aud_name}.aac', selected_audio_link])
    
    if sel_vid_name and sel_aud_name:
        output_x = f'Downloads\\Finished\\Vimeo\\{sel_vid_name}_{video_title}.mp4'
        
        print('\n [INFO] ffmpeg process started...\n')
        subprocess.run([ffm, '-v', 'quiet', '-stats', '-y', '-i', f'{temp_dir}\\{sel_vid_name}.mp4', '-i', f'{temp_dir}\\{sel_aud_name}.aac', '-c', 'copy', output_x])
    else:
        print("\n [ERROR] Need video and audio picked..")
    
    print(f'\n [INFO] file moved here:\n {output_x}')
    
    print('\n [INFO] Deleting unnecessary files..')
    
    temp_dir = 'Downloads/Temp'
    if os.path.exists(temp_dir):
        shutil.rmtree(temp_dir)
    
    print(' [INFO] All done.')
    ex_it = input('\nEnter to close..')
    exit()
    thanks! I tried this but unfortunately I am getting access denied, line 54 returns

    <HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>\n \nYou don\'t have permission to access "http://vod-adaptive-ak.vimeocdn.com/exp=1720021190%7eacl=%2Fbebfe42e-1d86-43e2-b093-c2c31bf0112d%2F%2A%7ehmac=076cced3a865ef8390b79f57 cbfb0fda0849fd23a42b82d9c6515a700ec40ac7/bebfe42e-1d86-43e2-b093-c2c31bf0112d/v2/playlist/av/primary/playlist.json?" on this server.<P>\nReference #18.3c8328b3.1720125598.14d7a911\n<P>https://errors.edgesuite.net/18.3c8328b3.1720125598.14d7a911</P>\n</BODY>\n</HTML>\n'
    is there any way to bypass it/send credentials?
    share raw response result of
    Code:
    player.vimeo.com/video
    Code:
    requests.get('http://player.vimeo.com/video', headers=headers).content
    Out[13]: b'<!DOCTYPE html>\n<html lang="">\n<head>\n<meta charset="utf-8">\n<title>Sorry</title>\n<style>\n    body, html {\n        width: 100%;\n        height: 100%;\n        margin: 0;\n        padding: 0;\n        background-color: #151515;\n        overflow: hidden;\n    }\n\n    body {\n        text-align: center;\n        font-family: \'Helvetica Neue\', \'Helvetica\', \'Arial\', sans-serif;\n        color: white;\n    }\n\n\t#horizon {\n        display: table;\n        height: 100%;\n        position: static;\n        width: 100%;\n    }\n\n\t#sun {\n        display: table-cell;\n        vertical-align: middle;\n        position: static;\n        margin: 0 auto;\n    }\n\n    code {\n      background-color: #302f2f;\n      border-radius: 5px;\n      display: inline-block;\n      width: 45%;\n      margin: 10px auto;\n      padding: 5px;\n      text-wrap: wrap;\n    }\n\n    h1, p, a {\n        margin: 0 auto;\n        max-width: 80%;\n    }\n\n    h1, p {\n        display: block;\n    }\n\n    h1 {\n        font-size: 48px;\n        margin-bottom: 5px;\n    }\n\n    p {\n        font-size: 24px;\n        max-width: 475px;\n    }\n\n    a {\n        color: #4bf;\n        text-decoration: none;\n    }\n\n    a[role="button"] {\n        margin-top: 15px;\n        display: inline-block;\n        color: #fff;\n        font-weight: bold;\n        padding: 10px 20px;\n        border-radius: 5px;\n        background: #4bf;\n        text-shadow: none;\n        font-size: 16px;\n    }\n\n    a[role="button"]:active {\n        background: #3795cc;\n    }\n\n    .smaller p {\n        font-size: 18px;\n    }\n\n    .smaller h1 {\n        font-size: 42px;\n    }\n\n    @media (max-width: 499px) {\n        p {\n            font-size: 16px;\n            line-height: 1.4;\n            max-width: 290px;\n        }\n\n        a[role="button"] {\n            font-size: 16px;\n            padding: 7px 15px;\n        }\n\n        .smaller p {\n            font-size: 15px;\n        }\n\n        .smaller a[role="button"] {\n            font-size: 14px;\n        }\n\n        .smaller h1 {\n            font-size: 36px;\n        }\n    }\n\n    @media (max-width: 300px) {\n        h1 {\n            font-size: 36px;\n        }\n\n        p {\n            font-size: 14px;\n            line-height: 1.4;\n            max-width: 250px;\n        }\n\n        a[role="button"] {\n            margin-top: 10px;\n            font-size: 14px;\n        }\n\n        .smaller p {\n            font-size: 12px;\n        }\n\n        .smaller a[role="button"] {\n            font-size: 12px;\n        }\n\n        .smaller h1 {\n            font-size: 28px;\n        }\n    }\n</style>\n\n</head>\n  <body class="">\n\t<div id="horizon">\n\t\t<div id="sun">\n      <h1>Sorry</h1>\n      <p>We\xe2\x80\x99re having a little trouble.</p>\n      \n      \n    </div>\n  </div>\n    <script>\n        \n        window.parent.postMessage({\n            event: \'error\',\n            data: {\n              message: \'We\xe2\x80\x99re having a little trouble.\',\n              name: \'NotFoundError\',\n              method: \'ready\',\n            },\n        }, document.referrer || \'*\');\n    </script>\n</body>\n'
    send this response,

    Image
    [Attachment 80433 - Click to enlarge]
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!