ShareShortcuts

Download Twitter & YouTube

Download from Twitter and YouTube with Quality

yas8p
Fork “Download Twitter & YouTube”

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 yas8p 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
62K
Saved
3
Actions
45
Category
Photos and videos
Version
1.0
Language
EN

Download from Twitter and YouTube with Quality .

YouTube

Twitter

What's New

Version 1.0

First release

Version History
1.0 Oct 25, 2020

First release

What it does

45 actions
  1. Text
  2. If
  3. Set Variable
    Url
  4. If
  5. Set Variable
    Url
  6. If
  7. Get Contents of URL
    https://downloadtwittervideo.appspot.com
  8. Get URLs from Input
  9. Match Text
  10. Choose from List
  11. Replace Text
  12. Match Text
  13. Text
  14. If
  15. If
  16. Match Text
  17. Dictionary
  18. Repeat with Each
  19. Get Contents of URL
    …
  20. Make HTML from Rich Text
  21. Get URLs from Input
  22. Match Text
  23. Match Text
  24. Match Text
  25. Replace Text
  26. Dictionary
  27. Choose from List
  28. If
  29. Show Notification
    You should copy link from YouTube or Twitter...
  30. Stop This Shortcut
  31. If
  32. Get Contents of URL
    …
  33. Match Text
  34. If
  35. Set Name
  36. Quick Look
  37. Choose from Menu
  38. Choose from Menu
    Save in photos
  39. Save to Photo Album
  40. Choose from Menu
    Save in file
  41. Save File
  42. If
  43. Show Notification
    Something's wrong...
  44. If
  45. Show Notification
    Something's wrong...

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 darkgray
#define glyph downloadArrow


if ShortcutInput {
	@Url = "twitter.Yas8p.com"
} else {
	@Url
}

if @Url contains "twitter" {
	formRequest("https://downloadtwittervideo.appspot.com", "POST", {
		"url": "{@Url}"
	})
	getURLs()
	const TwD = containsText(['Name'], ".*mp4|mp4.*")
	chooseFromList(TwD, "")
	replaceText(" |mp4|,", "", true)
	const VideoTwitter = containsText(, ".*{}.*")
} else {
	if @Url contains "yout" {
		const Id = containsText(@Url, "(?<=(\=|\/))([\w\-]{11})")
		const Dictionary = {
			"d": "www.320youtube.com/v5/watch?v={Id}",
			"g": "www.yt-download.org/api/widget/mp3/{Id}",
			"v": "www.yt-download.org/api/widget/videos/{Id}"
		}
		for _ in Dictionary['Values'] {
			const ContentsOfURL = downloadURL(@RepeatItem)
			makeHTML(ContentsOfURL)
		}
		getURLs(YT)
		containsText(, "[\w\.\/:_]*.(ytapivmp3.*)")
		containsText(, ".*/mp4/.*")
		containsText(, "https://www.yt-download.org/download/{Id}/mp3/320/.*")
		const Name = replaceText("| 320YouTube", "", ['Name'], false)
		const Dictionary1 = {
			"mp3 1": "{}",
			"mp3 2": "{}",
			"mp4 med": "{}"
		}
		chooseFromList(Dictionary1, Name)
	} else {
		showNotification("You should copy link from YouTube or Twitter...", "Twitter:Yas8p", false)
		stop()
	}
}

if url contains "http" {
	const File = downloadURL(url)
	const Matches = containsText(File['File Extension'], "mp4|mp3")
	if Matches {
		const Video = setName(File, Name)
		quicklook(Video)
		menu "" {
		item "Save in photos":
			savePhoto(Video)
		item "Save in file":
			saveFilePrompt(Video)
		}
	} else {
		showNotification("Something's wrong...", "Twitter:Yas8p", false)
	}
} else {
	showNotification("Something's wrong...", "Twitter:yas8p", false)
}
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 yas8p

See All

You Might Also Like

See All
Advertisement