🚑 Added "ignore errors" to ytdl options

This commit is contained in:
2021-04-11 11:50:39 +03:00
parent da99ec6b92
commit 887bb145a2

View File

@@ -5,6 +5,7 @@ from pathlib import Path
import os import os
import json import json
import argparse import argparse
import logging
import youtube_dl import youtube_dl
from get_channels import retrieve_youtube_subscriptions from get_channels import retrieve_youtube_subscriptions
from print_logo import print_logo from print_logo import print_logo
@@ -48,7 +49,8 @@ download_all = args.all
c = Console() c = Console()
ydl_opts = { ydl_opts = {
'format': 'best' 'format': 'best',
'ignoreerrors': True
} }
print_logo() print_logo()
@@ -80,7 +82,7 @@ else:
else: else:
c.print('Press "y" or "n"', style='yellow') c.print('Press "y" or "n"', style='yellow')
c.print('All done! 🎉') c.print('All done! :party_popper:', style='green')
c.print('Saving to download_list.json...', style='italic') c.print('Saving to download_list.json...', style='italic')
f = open("download_list.json", "w", encoding='utf-8') f = open("download_list.json", "w", encoding='utf-8')
f.write(json.dumps(all_channels, indent=4)) f.write(json.dumps(all_channels, indent=4))