Skip to content

Instantly share code, notes, and snippets.

View icosane's full-sized avatar

icosane

View GitHub Profile
@icosane
icosane / saucenao.py
Last active August 10, 2021 21:03
very simple Pythonista script to search for anime images in Safari using SauceNao
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='
@icosane
icosane / yt-dlp.py
Last active April 23, 2022 01:06 — forked from nneonneo/youtube-dl.py
yt-dlp for Pythonista - download or stream YouTube videos on your iPhone/iPad
#!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