This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python3 | |
''' | |
As of 17/10/21, probably not working and with no fix in sight. Youtube changed something on their side, so yt-dlp and youtube-dl fail to extract videos. Only format 22, which is 720p, works. I haven't used it on my phone for a few months, but yt-dlp loads only 720p on my PC, so I think it is the same for this script. | |
Directions: | |
- install yt-dlp via pip (e.g. using the StaSh command: https://github.com/ywangd/stash) | |
- add this script as a Share extension through Settings -> Share Extension Shortcuts | |
- while watching a video in the YouTube site or app, just share the video to Pythonista and select this script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import appex | |
from objc_util import UIApplication, nsurl | |
if appex.get_attachments(): | |
url = appex.get_attachments()[0] | |
app = UIApplication.sharedApplication() | |
search = 'https://saucenao.com/search.php?&url=' |