• spike

    @cvp said:

    Thus the problem seems to be in the callback

    Ok after 6 months I think I’ve solved it. For some reason the x-success parameter has to be percent encoded. Idk why. I don’t even think this behavior is even officially documented anywhere. I only found out because of this random article about automating things through the drafts app (https://www.macstories.net/tutorials/guide-url-scheme-ios-drafts/).

    But anyway this code should work now. Btw I just looked up percent encoder online to actually encode it bc I was too lazy to figure out a way to do it myself or figure out what percent encoding even is.

    import webbrowser
    url = 'url=https://youtu.be/fgZgVNxhU04'
    webbrowser.open('vlc-x-callback://x-callback-url/stream?' + url +'&x-success= pythonista3%3A%2F%2FMesApps%2FMesPastels.py%3Faction%3Drun')
    

    posted in Pythonista read more
  • spike

    @cvp I’m sorry for reviving this issue but when running your code it still only opens the python file — as in it doesn’t run it. Is there a bug in the action=run argument in Pythonista?

    posted in Pythonista read more
  • spike

    @cvp nope. Sadly that doesn’t change anything

    posted in Pythonista read more
  • spike

    I called an x callback string
    ‘webbrowser.open('vlc-x-callback://x-callback-url/stream?' + url +'&x-success=pythonista:/ytdl/youtub-playlist2.py?action=run&x-source=Pythonista3')’
    And it opens the video from the url in VLC but when it finishes playing it only sends me back to the file “youtub-playlist2.py” but it never runs it. How can I make it run this file when the video finishes?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!