Отсканируй на iPhone, чтобы установить
Fix downloading and make it easy to use and download. copy the link and share into the shortcut and download video and audio from YouTube 😎
Что нового
Версия 1.2
Fixed bugs and making faster than previous version
Что делает
Действий: 40-
CommentDownload YouTube video in MP4 & MP3 format Videos saved into your camera roll and audio files saved in your files app Created by: @Pola219
-
Dictionary
-
Get Contents of URLhttps://updatekit.mikebeas.com/v1
-
Get Dictionary Value
-
If
-
Choose from MenuNew version available. What's new: … - Choose UPDATE to download last version.
-
Choose from MenuUPDATE
-
URL
-
Stop This Shortcut
-
Choose from MenuSKIP
-
Nothing
-
Text
-
Get URLs from Input
-
Set Variableurl
-
Get Variable
-
If
-
Show Result
-
URLhttps://9convert.com/api/ajaxSearch/index
-
Get Contents of URL…
-
Set VariableVid
-
Set Variablemp4
-
Repeat with Each
-
If
-
Text
-
Add to Variable
-
Get Dictionary Value
-
Get Item from List
-
Text
-
Add to Variable
-
Choose from List
-
Split Text
-
Get Item from List
-
URLhttps://9convert.com/api/ajaxConvert/convert
-
Get Contents of URL…
-
Get Contents of URL…
-
If
-
Replace Text
-
Save File
-
If
-
Save to Photo Album
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/web'
#define color green
#define glyph videoIcon
/*
Download YouTube video in MP4 & MP3 format
Videos saved into your camera roll and audio files saved in your files app
Created by: @Pola219
*/
const UPDATE = jsonRequest("https://updatekit.mikebeas.com/v1", "POST", {
"shortcut": {
"id": "17122",
"module": "routinehub",
"version": "1.3"
}
})
const Response = getValue(UPDATE, "update")
if Response == {
menu "New version available. \nWhat's new: \n{UPDATE['payload.notes']} - Choose UPDATE to download last version." {
item "UPDATE":
url(UPDATE['payload.download'])
stop()
item "SKIP":
}
}
getURLs(ShortcutInput)
@url
// TODO: Get Variable not supported: Assign variable here to '@url'.
if @url contains "youtu" {
show("Start downloading and converting the video. Are you ready?\n\nTap Done ✅ and download.")
url("https://9convert.com/api/ajaxSearch/index")
const res = formRequest(, "POST", {
"URL": "{@url}",
"id": "{@url}",
"locale": "en",
"query": "{@url}",
"url": "{@url}",
"vt": "home"
}, {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Referer": "https://9convert.com/en382",
"Sec-Fetch-Diest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1",
"X-Requested-With": "XMLHttpRequest"
})
@Vid = res['vid']
@mp4 = res['links.mp4']
for _ in @mp4 {
if @RepeatItem !contains "\"q\":\"auto\"" {
@Resolutions += "{@RepeatItem['q']} - ({@RepeatItem['size']})\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@@@@@\n{@RepeatItem['k']}"
}
}
const DictionaryValue = getKeys(res['links.mp3'])
getFirstItem(DictionaryValue)
@Resolutions += "Audio - ({['size']})\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@@@@@\n{['k']}"
const ChosenItem = chooseFromList(@Resolutions, "Select video quality to download")
const SplitText = splitText(ChosenItem, "@@@@@")
const K = getFirstItem(SplitText)
url("https://9convert.com/api/ajaxConvert/convert")
formRequest(, "POST", {
"k": "{K}",
"vid": "{@Vid}"
}, {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1"
})
const Filename = downloadURL(['dlink'])
if ChosenItem contains "Audio" {
const audioname = replaceText("9convert.com - ", "", Filename)
saveFile("YT MUSIC/{audioname}.mp3", Filename)
} else {
savePhoto(Filename)
}
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от pola
Вам также может понравиться
Реклама