GithubHelp home page GithubHelp logo

minanagehsalalma / youtube-downloader-bookmarklet Goto Github PK

View Code? Open in Web Editor NEW
44.0 4.0 4.0 27 KB

A Javascript Bookmarklet That creates a menu for downloading YT Vids without needing any third party app nor site.

JavaScript 100.00%

youtube-downloader-bookmarklet's Introduction

Youtube-Downloader-Bookmarklet

A Javascript Bookmarklet That creates a menu for downloading YT Vids without needing any third party app nor site.

How It works

  1. The code is ought to extract links from the youtube video source code The download look like this
https://rr2---sn-p5qlsnrr.googlevideo.com/videoplayback?expire=1684468489\u0026ei=qZ5mZN7BNMKK8wS1_oPwAQ\u0026ip=5.161.183.140\u0026id=o-AJuy0sBEqnpSzwaxTvnIu073VR0LXVtqdliiv_1OFgf9\u0026itag=133\u0026aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278\u0026source=youtube\u0026requiressl=yes\u0026mh=rN\u0026mm=31%2C29\u0026mn=sn-p5qlsnrr%2Csn-p5qs7nsk\u0026ms=au%2Crdu\u0026mv=m\u0026mvi=2\u0026pl=25\u0026initcwndbps=228750\u0026vprv=1\u0026svpuc=1\u0026mime=video%2Fmp4\u0026ns=K3Z9gDwnP7LVoVPaftnIDXYN\u0026gir=yes\u0026clen=15402279\u0026dur=858.840\u0026lmt=1684426280879666\u0026mt=1684446550\u0026fvip=2\u0026keepalive=yes\u0026fexp=24007246\u0026c=WEB\u0026txp=6319224\u0026n=71Y3gTJ9yPp1DNi2Kb\u0026sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt\u0026sig=AOq0QJ8wRAIgaf5d6vVdJEd4bfxpyTZIpX94BNLZJj2NxqsCF8o5xwACIH5_shJUMe1LiCm4gbX4w9cxDP1doWUCTDkvz-HCtJ-k\u0026lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps\u0026lsig=AG3C_xAwRQIgFgL1GSHAIL3dDefp4zeDWQ5Y2YYpXQx7oILBvaqvxa0CIQDSrlTcbeUqwKT859PtJ-Wa1DXspKM1auWPvRCd_xFdSA%3D%3D
  1. The highlight to distinguish these links from the others is "videoplayback?expire" so there shall be a regex to extract all urls that contain that.

  2. to specify the video quality/format we use the itag parameter from the link. we know that the itag parameter with value "22" stands for 720 mp4 ...etc the full list

  3. for the urls to work you need to replace "\u0026" with "&" and decode / Escape any encoded bits

  4. The bookmarklet Prompt Version should show a prompt that allows the user to select from the available formats while the WithMenu injects a menu into the current video code

Usage :

  • Copy the code from WithMenuMimfiyed.js or PromptMimfiyed.js whatever you prefer from the two , then add a new page to the bookmark bar , and paste the code into the url of the bookmark , and input any name.

  • now you go to whatever YT vid page you want to download and click on the newly created bookmark page. then the download menu will pop up. note that you need to refersh the page each time you use it.

A Demo :

Menu.compressed.mp4
PromptEdited.mp4

Side Note : to make the downloaded files have the vid name we added a title parameter to the url with the vid name extracted using the tab title

The Site to convert JS code to Bookmarklet

chriszarate.github.io/bookmarkleter

youtube-downloader-bookmarklet's People

Contributors

minanagehsalalma avatar quetzalcoatl82 avatar

Stargazers

Chuck Rincón avatar n0099 avatar Ayush Kumar avatar  avatar  avatar Jonas Müller avatar Christian T R avatar Krzysztof Wilczyński avatar  avatar Juan avatar Brian Forsberg avatar Naser Aleisa avatar J Wong avatar  avatar 远风(Yuan Feng, Farwind) avatar Joseph Fernandez avatar dai avatar Benry avatar Jarrod Oxical avatar Michael Trommer avatar  avatar Purebox avatar  avatar MrBreakNFix avatar Peyman avatar Paul Hubbard avatar  avatar  avatar Aria avatar Rodhri Erebo avatar  avatar  avatar  avatar  avatar Woolfy avatar  avatar  avatar Emanuele Sabetta avatar Zach H. avatar  avatar Jérémie M avatar Ben McGraw avatar  avatar Mohammed Omer avatar

Watchers

Sam Hasler avatar  avatar  avatar MrBreakNFix avatar

youtube-downloader-bookmarklet's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.