Skip to content

Instantly share code, notes, and snippets.

@yaserahmady
Last active June 16, 2019 10:41
Show Gist options
  • Select an option

  • Save yaserahmady/eff520db083ddb3756e1924a7a3128fa to your computer and use it in GitHub Desktop.

Select an option

Save yaserahmady/eff520db083ddb3756e1924a7a3128fa to your computer and use it in GitHub Desktop.
Use youtube-dl on a jailbroken iOS 12 device

Prerequisites

  1. Add McApollo's repo
  2. Install Python@3.7
  3. Install SDK Installer / On device compiler (it has pip3)
  4. Install Youtube-dl

Updating

Run youtube-dl -U or pip3 install --upgrade youtube-dl

Using it with Shortcuts.app

This will download the specified video in the background to /var/mobile/Downloads and send a notification once it's finished downloading.

  1. Install MidnightChips' Local SSH from Packix
  2. Install tateu's SendTestBulletin from tateu's repo.
  3. Copy youtube.sh somewhere on your phone like in /private/var/mobile/Documents/Scripts.
  4. Run cd /private/var/mobile/Documents/Scriptschmod +x youtube.sh.
  5. Create a new Shortcut and add it to the Share sheet
  6. Put a run SSH command action in there with these settings:
  • Host: 127.0.0.1
  • Port: 2222
  • User: root
  • Password: alpine
  • Command: screen -dm bash -c "/var/mobile/Documents/Scripts/youtube.sh {Shortcut Input}"
#!/bin/bash
stb -b "com.apple.MobileSMS" -t "Downloading…" -s "" -m ""
cd /var/mobile/Downloads ;
/usr/local/bin/youtube-dl --no-check-certificate $1 ;
stb -b "com.apple.MobileSMS" -t "Downloaded!" -s "" -m ""
@yaserahmady
Copy link
Author

If you get something like this

$ youtube-dl https://youtu.be/gNxL
kYUNkSM
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'

Try this https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment