inspired by https://github.com/FrankLaVigne/SessionDownloader
pip install requests tqdm
python ignite_2020_downloader.py
inspired by https://github.com/FrankLaVigne/SessionDownloader
pip install requests tqdm
python ignite_2020_downloader.py
from pprint import pprint | |
from tqdm import tqdm | |
import requests | |
print('Loading session list ...') | |
res = requests.get('https://api.myignite.microsoft.com/api/session/all') | |
res.raise_for_status() | |
session_list = res.json() | |
print(f'Try {len(session_list)} videos ...') | |
for session in tqdm(session_list): | |
title = session['title'] | |
filename = f'{title}.mp4' | |
url = session['downloadVideoLink'] | |
if not url: | |
continue | |
res = requests.get(url) | |
res.raise_for_status() | |
with open(filename, 'wb') as f: | |
for chunk in res.iter_content(chunk_size=8192): | |
f.write(chunk) |