Maximo Fernandez commited on
Commit
153db1c
·
1 Parent(s): 867ca43

Do not check certificates

Browse files
Files changed (1) hide show
  1. download.py +4 -2
download.py CHANGED
@@ -66,11 +66,13 @@ def download_twitch(url, type):
66
  os.system(f'rm {AUDIO_FOLDER}/{DOWNLOAD_AUDIO_NAME}.{args.format}')
67
 
68
  def download_youtube_video(url):
69
- command = f"yt-dlp -o '{VIDEO_FOLDER}/{DOWNLOAD_VIDEO_NAME}.{DOWNLOAD_VIDEO_FORMAT}' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]' --no-check-certificates --force-ipv4 --geo-bypass '{url}'"
 
70
  os.system(command)
71
 
72
  def download_youtube_audio(url):
73
- command = f"yt-dlp '{url}' -o '{AUDIO_FOLDER}/{DOWNLOAD_AUDIO_NAME}.{DOWNLOAD_AUDIO_FORMAT}' --no-check-certificates --force-ipv4 --geo-bypass --extract-audio --audio-format mp3 --audio-quality 0"
 
74
  os.system(command)
75
 
76
  def download_youtube(url, type):
 
66
  os.system(f'rm {AUDIO_FOLDER}/{DOWNLOAD_AUDIO_NAME}.{args.format}')
67
 
68
  def download_youtube_video(url):
69
+ user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
70
+ command = f"yt-dlp -o '{VIDEO_FOLDER}/{DOWNLOAD_VIDEO_NAME}.{DOWNLOAD_VIDEO_FORMAT}' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]' --user-agent '{user_agent}' --no-check-certificates --force-ipv4 --geo-bypass '{url}'"
71
  os.system(command)
72
 
73
  def download_youtube_audio(url):
74
+ user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
75
+ command = f"yt-dlp '{url}' -o '{AUDIO_FOLDER}/{DOWNLOAD_AUDIO_NAME}.{DOWNLOAD_AUDIO_FORMAT}' --user-agent '{user_agent}' --no-check-certificates --force-ipv4 --geo-bypass --extract-audio --audio-format mp3 --audio-quality 0"
76
  os.system(command)
77
 
78
  def download_youtube(url, type):