GithubHelp home page GithubHelp logo

ytdl's Introduction

ytdl

Get youtube video download url

JSON api

A sample url to get information of DAOKO × 米津玄師『打上花火』MUSIC VIDEO.

https://ytdl.maple3142.net/api?id=-tKVN2mAKRI

To download other video, just change id in the url.

Formatted version

https://ytdl.maple3142.net/api?id=T2pdmZhDXfo&format=1

You can append format=1 to get a human readable JSON.

Graphql

Graphiql: https://ytdl.maple3142.net/graphql

Query:

query ($id: String!) {
  search(id: $id) {
    meta {
      title
      thumbnail_url
      author
      view_count
    }
    stream {
      quality
      type
      url
      itag
    }
  }
}

Variables:

{
  "id": "XogSflwXgpw"
}

Userscript

Local YouTube Downloader

Source Code

A simple youtube link fetcher implemented in browser.

ytdl's People

Contributors

dependabot[bot] avatar maple3142 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ytdl's Issues

hi,最近在使用ytdl解析video获取视频地址时出现Invalid regular expression,不知道是否属于正常情况

以下错误代码提示是在终端会收到,但是程序执行是有返回相关的结果,能够获取到相关video的info,
不知道有没有办法屏蔽这个错误提示或者修复的办法?

use fallback SyntaxError: Invalid regular expression: /c)));d&&g.R=function((.+?)){(.+?)}/: Unmatched ')'
at new RegExp ()
at parsedecsig (/Users/xxxx/ytdl/decsig.js:39:31)

部分影片無法正常取得

非常感謝您的教學範例,但我使用的過程中有部分影片無法正常取得資源,我把錯誤回報給您

案例1

程式擲出錯誤

use fallback ReferenceError [Error]: yt is not defined
    at playerBootstrap (vm.js:1:66960)
    at vm.js:1:67207
    at Script.runInContext (vm.js:137:20)
    at D:\Node\ytdl\node_modules\vm2\lib\main.js:778:53
    at timeout_bridge.js:1:1
    at Script.runInContext (vm.js:137:20)
    at doWithTimeout (D:\Node\ytdl\node_modules\vm2\lib\main.js:462:17)
    at VM.run (D:\Node\ytdl\node_modules\vm2\lib\main.js:776:10)
    at exports.runInContext (D:\Node\ytdl\sandboxutil.js:5:12)
    at D:\Node\ytdl\decsig.js:62:4

案例2

有正常取得資源連結,但無法正常取得音訊資源

存取 r2---sn-u4h-un5l.googlevideo.com 的要求遭到拒絕您未獲得授權,無法瀏覽這個網頁。
HTTP ERROR 403

active?

Is this project still active? The sample link is not working.

Pop up for disable Adblocker in local YouTube downloader userscript

This problem only occurs in chrome browser. I use windows desktop and latest chrome browser. Whenever I play any YouTube video, there is appear a popup for disable Adblocker for work your script well. But this script works well without disable Adblocker. So why this pop up...plz fix that

720p

Not showing 720p links anymore!!

hi,又要来麻烦你帮忙确认一个问题?我把代码clone布署到我的服务器上返回生成的url还是出现了403,但我在本地localhost时是能正常使用,不知道是哪里还需要做配置?

普通的video没有问题,
主要还是带signature的影片,
因为我还没买https证书,
在服务器这边只是简单的开启了ip地址访问api,
不知道是不是必须要绑定域名加https才可以?

另外我尝试使用readme里面提供的的接口地址,加上我要下载的videoId,
比如 https://maple3142-ytdl.glitch.me/api?id=jUeryEph6uc

返回过来的url也是同样403错误,
只有在本地localhost访问返回过来的url可以正常的能下载。
如果可以的话,希望您能帮忙在做一下协助

The YouTube get_video_info API seems to be dead

The API https://www.youtube.com/get_video_info?video_id=${id}&el=detailpage returns HTTP 404.
Therefore your JSON API https://ytdl.maple3142.net/api?id=${id} always returns "Adblock conflict".

No adblock application but still warning for adblock.

使用360极速浏览器,关闭所有安全设置,关闭所有插件。今天下午能使用,晚上突然不能用。搜索广告都搜不出东西来,提示“您看起来在使用广告拦截扩充功能。”
Using 360 extreme brower. Turned off all security settings and plug-ins. I can normally use it till this afternoon but fail tonight. Tried a lot and never work. Still warning"'You seems to have ad-blocking extension installed".
请问有无调试的方法,或是怎么知道到底是什么阻止了地址获取?多谢
Is there any logs to debug? thanks a lot

error 'The page isn't redirecting properly'

tested links:

HAR logs:
https://gist.github.com/ccdd13/c2372ceab38711370b450976eca4cdf8

browser : firefox 76.0.1 (64-bit)

error message

The page isn't redirecting properly

An error occurred during a connection to ytdl.maple3142.net.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

hi,有关个别影片的url在locahost解析能正常下载播放,放在server上面无法工作的问题,我发现找到原因了,不知道你这边能否帮忙确认一下?

我是在这个地方了解到 fent/node-ytdl-core#434 (comment)
这个老外也有同样的问题,
youtube这边针对一些 video,它是限制了只有当前访问ip 才能访问,
比如我们解析出来这样的url:

https://r3---sn-4g5e6nez.googlevideo.com/videoplayback?expire=1561305511&ei=R00PXY78K9WKVs7ntbAJ&ip=82.234.194.1&id=o-ANEPRjYC1uJ3bX4QcSUV6CJuVGXzdHxqSP-Rb5C6W5TV&itag=22&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-4g5e6nez%2Csn-4gxx-25gee&ms=au%2Crdu&mv=m&pl=15&nh=%2CEAE&gcr=fr&initcwndbps=637500&mime=video%2Fmp4&ratebypass=yes&dur=4008.901&lmt=1560702935607179&mt=1561283809&fvip=7&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cmime%2Cratebypass%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cnh%2Cinitcwndbps&lsig=AHylml4wRQIgdPTIG6t5iT0lpD8z7PmpI26Aux--9MwTHQztVZ-w3rECIQDDJwVJKFZ61XCavQXmyA1nsh--vpNBaIrc3AFJeH4ZHw%3D%3D&sig=ALgxI2wwRQIgZxbWhzD_JImSbV5FsgavJWOHx1DpamZJZi30suowLbICIQDy7E-50PMbCWgxmeblMJBkPR28I6Vb8HhK0gKIw3OIPw==

这其中的ip=82.234.194.1 是我本地的ip,所以在本地点击过去是能正常播放和下载的,
如果是在server上面解析出来,ip这边会是服务器的ip,然后我在电脑这边访问服务器这边解析出来的url,就会出现403,因为ip不同导致。

所以我的问题是,有没有办法让解析程序这边把 ip这一参数单独处理,替换为 当前访问的ip值上去,让youtube认为是当前浏览器这边的访问ip在访问然后去生成url,我想这样就能解决个别video出现403问题了。

希望大神在帮忙看看这个方案有没有可行性?

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.