Skip to content

Download video(s) from YouTube using Pythonista and Shortcuts

Notifications You must be signed in to change notification settings

solarfl4re/ios-ytdl-shortcuts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

ios-ytdl-shortcuts

Download video(s) from YouTube using Pythonista and Shortcuts

Requirements:

  • iOS
  • Pythonista with StaSh and youtube-dl
  • Shortcuts

Usage

  • Install Pythonista, StaSh, and youtube-dl (using pip in StaSh).
  • Save shortcuts_ytdl.py to Pythonista's root directory.
  • Add the shortcuts to Shortcuts.
  • Go to YouTube and share a URL, tap 'Shortcuts' and choose Скачать аудио/видео с YouTube (depending on if you want to download audio or video.

Flow

iOS share sheet (YouTube URL) > Скачать ... с YouTube [Shortcuts] > shortcuts_ytdl.py [Pythonista] > yt_save3 [Shortcuts]

Files:

shortcuts_ytdl.py

Input: a YouTube URL (video, playlist) and a string 'video' or 'audio', which determines what format we download from YouTube.

Output: a base64-encoded ZIP archive of the downloaded songs, on the clipboard.

Uses youtube-dl to download videos as videos or audio files. To pass files on to Shortcuts, it adds each file to a ZIP archive, encodes it with base64, and then puts it on the clipboard.

Shortcuts

Счачать видео с YouTube ('Download video from YouTube')

Счачать аудио с YouTube ('Download audio from YouTube')

Simple Shortcuts that take a URL-address as input (https://youtu.be/Wtg5cTQ1WTs) and pass the URL and either 'video' or 'audio' to shortcuts_ytdl.

yt_save3

Called by shortcuts_ytdl when all videos are downloaded. Takes the archive off the clipboard, decodes it, and then offers to save the audio/video files on the device.

About

Download video(s) from YouTube using Pythonista and Shortcuts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages