Spotify ➤ MP3
Run it from Spotify Share Sheet or copy the Spotify track URL and run into the shortcut. This shortcut can be used on Apple Watch too.
Что нового
Версия 1.3
Add more sites with proper attributes
Что делает
Действий: 37-
CommentCreated by: @Pola219 Get More Useful Shortcuts in: https://routinehub.co/user/Pola219
-
CommentVersion 1.5
-
If
-
Get URLs from Input
-
Get Item from List
-
URL
-
Expand URL
-
Set VariableiniLink
-
Split Text
-
Get Item from List
-
Set Variabledomain
-
Get Contents of URLhttps://spotifymate.com
-
Make HTML from Rich Text
-
Match Text
-
Split Text
-
Get Item from List
-
Get Item from List
-
Get Contents of URLhttps://spotifymate.com/action
-
Get Text from Input
-
Split Text
-
Get Item from List
-
Get Item from List
-
Text
-
Get URLs from Input
-
Repeat with Each
-
Get Item from List
-
If
-
Get URLs from Input
-
If
-
Nothing
-
Get Item from List
-
If
-
Get Contents of URL…
-
Set Name
-
Save File
-
If
-
Show NotificationNo URL specific ☹️
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/web'
#define color green
#define glyph musicNote
/*
Created by: @Pola219
Get More Useful Shortcuts in:
https://routinehub.co/user/Pola219
*/
// Version 1.5
if ShortcutInput {
const URLs = getURLs(ShortcutInput)
const ItemFromList = getLastItem(URLs)
const InputURL = url(ItemFromList)
@iniLink = expandURL(InputURL)
const SplitText = splitText(@iniLink, ".")
@domain = getListItem(SplitText, 2)
const ContentsOfURL = downloadURL("https://spotifymate.com")
makeHTML(ContentsOfURL)
const Matches = containsText(, "(?<=<input name=\")(.*?)(?=\" type=\"hidden\" value=\")(.*?)(?=\" \/>)")
const SplitText1 = splitText(Matches, """)
const Value = getFirstItem(SplitText1)
const Key = getLastItem(SplitText1)
const ContentsOfURL1 = formRequest("https://spotifymate.com/action", "POST", {
"url": "{@iniLink}",
"{Key}": "{Value}"
})
const Text = getText(ContentsOfURL1)
const SplitText2 = splitText(Text)
getListItem(SplitText2, 2)
getListItem(SplitText2, 3)
const URLs1 = getURLs(ContentsOfURL1)
for _ in URLs1 {
const ItemFromList1 = getListItem(@RepeatItem, 1)
if ItemFromList1['Name'] contains "Mp3" {
getURLs(@RepeatItem)
} else {
}
}
getListItem(RepeatResults, 0)
if @domain contains "spotify" {
const ContentsOfURL2 = downloadURL()
const RenamedItem = setName(ContentsOfURL2)
saveFilePrompt(RenamedItem)
}
} else {
showNotification("No URL specific ☹️ ", "Invalid URL!")
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от pola
Вам также может понравиться
Реклама