omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    iOS 9's Picture in Picture with Youtube- powered by Pythonista

    Pythonista
    1.6 youtube beta ios9 share
    1
    2
    3769
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Webmaster4o
      Webmaster4o last edited by Webmaster4o

      This script allows you to take youtube videos from the youtube app (which does not currently support picture-in-picture) and use them with picture-in-picture. This relies on the keepvid service to download the video. Here's how it works:

      1. The shortened URL is expanded to a full youtube URL.
      2. Pass it to the keepvid service by adding http://www.keepvid.com/?url= in front of the url
      3. Use BeautifulSoup to find all the links on the page
      4. Make a list of all the links on the page that contain googlevideo.com (some are to redirect.googlevideo.com, and some are from another googlevideo.com page
      5. Open the first one in the browser

      Now the video is in the browser with the default iOS video dialog, and can be used with picture-in-picture.

      Video of the script in action here
      Gist here

      The script can be used from a youtube video in the browser through appex, in which the url will be displayed, or can be used from the app, in which case the video will be opened. It sucks that webbrowser.open doesn't work in the app extension.

      Because of the use of appex and dialogs, it requires Pythonista 1.6, but could be easily modified not to.

      Note- this took me all morning, even though it's not that long a script, I had never used BeautifulSoup before, so it took me a while. I had also planned to use savefrom.net, but couldn't find where the link was in the HTML for the page, so I switched to keepvid.com

      1 Reply Last reply Reply Quote 1
      • Webmaster4o
        Webmaster4o last edited by

        1.5-compatible version

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors