ShareShortcuts

Spotify ➤ MP3

pola
Fork “Spotify ➤ MP3”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so pola gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
28K
Saved
1
Actions
37
Category
Social Network
Version
1.3
Language
EN

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.

What's New

Version 1.3

Add more sites with proper attributes

Version History
1.3 Apr 25, 2024

Add more sites with proper attributes

1.2 Mar 23, 2024

Added proper error handling. The shortcut now faster than previous version

1.1 Jan 25, 2024

Improved security

1.0 Dec 14, 2023

First release

What it does

37 actions
  1. Comment
    Created by: @Pola219 Get More Useful Shortcuts in: https://routinehub.co/user/Pola219
  2. Comment
    Version 1.5
  3. If
  4. Get URLs from Input
  5. Get Item from List
  6. URL
  7. Expand URL
  8. Set Variable
    iniLink
  9. Split Text
  10. Get Item from List
  11. Set Variable
    domain
  12. Get Contents of URL
    https://spotifymate.com
  13. Make HTML from Rich Text
  14. Match Text
  15. Split Text
  16. Get Item from List
  17. Get Item from List
  18. Get Contents of URL
    https://spotifymate.com/action
  19. Get Text from Input
  20. Split Text
  21. Get Item from List
  22. Get Item from List
  23. Text
  24. Get URLs from Input
  25. Repeat with Each
  26. Get Item from List
  27. If
  28. Get URLs from Input
  29. If
  30. Nothing
  31. Get Item from List
  32. If
  33. Get Contents of URL
    …
  34. Set Name
  35. Save File
  36. If
  37. Show Notification
    No URL specific ☹️

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#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!")
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by pola

See All

You Might Also Like

See All
Advertisement