久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何從 youtube url 獲取視頻的直接 url?

How to get direct url of video from youtube url?(如何從 youtube url 獲取視頻的直接 url?)
本文介紹了如何從 youtube url 獲取視頻的直接 url?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在 Discord.JS(它是 Node.JS 的庫)中創建一個機器人,我想向它添加一個音樂模塊.Discord.JS 可以在語音頻道中播放 .wav、.mp4 等格式的視頻.我想為用戶添加一種可能性,只需輸入視頻的 YouTube 網址即可播放.是否有可能通過 API 或任何其他方式從 YouTube 網址獲取視頻網址?

I'm creating a bot in Discord.JS (it's a library for Node.JS) and I would like to add a music module to it. Discord.JS can play videos in formats like .wav, .mp4 etc. in voice channels. I would like to add a possibility for users to just type a YouTube url of a video to play it. Is there any possibility to get a video's url from an YouTube url by an API or any other way?

推薦答案

您過去可以通過 youtube.com/get_video?video_id=... 輕松獲得它,但這就像5 多年前,現在我認為它使用了一些奇怪的流東西.

You used to be able to get it pretty easily with youtube.com/get_video?video_id=... but that was like 5+ years ago, now I think it uses some weird stream thing.

我認為 Youtube 的官方 API 不允許您下載視頻或獲取 URL.此外,您可能應該查看 YouTube TOS

I don't think Youtube's official API lets you download videos or get a URL. Also, you should probably take a look at section 5B of the YouTube TOS

您不得下載任何內容,除非您看到 YouTube 在該內容的服務上顯示下載"或類似鏈接.

You shall not download any Content unless you see a "download" or similar link displayed by YouTube on the Service for that Content.

但無論如何,我知道的一種方法是 youtube-dl,但我是很確定它只適用于python.不過,網上似乎有一些節點包裝器(ex.)

But anyway, one method I know is youtube-dl, but I'm pretty sure it's only for python. There seem to be a few node wrappers online though (ex.)

我還找到了一個 node.js youtube 下載器,ytdl.上次更新是 9 天前,所以它應該可以在當前系統上正常工作.您應該可以使用 -o filename--output filename 下載它,或 --print-url 直接獲取視頻網址.

I've also found a node.js youtube downloader, ytdl. Last update was 9 days ago so it should probably be working fine with the current system. You should be able to use -o filename or --output filename to download it, or --print-url to get a direct video url.

這篇關于如何從 youtube url 獲取視頻的直接 url?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: 国产一区二区三区四区在线观看 | www.亚洲精品 | 人人cao| 1区2区3区视频 | 国产精品国产精品国产专区不片 | 91精品国产乱码久久久久久 | 亚洲免费视频网址 | 国产高清视频在线观看 | 亚洲欧美在线视频 | 成人精品在线视频 | 亚洲精品久久久久久久久久久久久 | 中文字幕一区二区在线观看 | 色婷婷综合网 | 亚洲人的av | 亚洲三级在线观看 | 精品1区2区 | 久久区二区 | 亚洲精品片 | 国产成人叼嘿视频在线观看 | 成人免费视频网址 | 色www精品视频在线观看 | 久久99精品久久久水蜜桃 | 精品一区二区三区在线观看 | 亚洲色图综合网 | 在线播放一区二区三区 | 九九热免费视频在线观看 | 成人性生交大免费 | 蜜桃视频麻豆 | 91中文字幕在线观看 | 久久久久久久久淑女av国产精品 | 亚洲狠狠爱一区二区三区 | 久久久久国产精品一区 | 日韩在线免费 | 欧美一区日韩一区 | 日本小视频网站 | 国产在线观看一区 | 99久久久国产精品 | 日韩精品无码一区二区三区 | 精品一区二区电影 | 国产一区二区高清在线 | 成人网视频 |