ShareShortcuts
Dupliquer « DTikTok »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que aabbccddeeffgg2000 soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
60K
Enregistré
0
Actions
55
Catégorie
API
Version
1.0
Langue
EN

Aperçu

Nouveautés

Version 1.0

First release

Historique des versions
1.0 7 déc. 2022

First release

Ce qu’il fait

55 actions
  1. Comment
    DTikTok made by user/heismauri on RoutineHub
  2. Dictionary
  3. Get Contents of URL
    https://routinehub.co/api/v1/shortcuts/…/versions/latest
  4. Get Dictionary Value
  5. If
  6. Text
  7. Choose from Menu
    …
  8. Choose from Menu
    Update now
  9. URL
    https://routinehub.co/download/…
  10. Open URLs
  11. Choose from Menu
    Update later
  12. If
  13. Set Variable
    url
  14. If
  15. Get Clipboard
  16. Set Variable
    url
  17. Expand URL
  18. Match Text
  19. URL
    ……
  20. Get Contents of URL
    …
  21. Make HTML from Rich Text
  22. Match Text
  23. Get Dictionary from Input
  24. Choose from Menu
    What would you like to download?
  25. Choose from Menu
    Original video
  26. Set Variable
    original
  27. Choose from Menu
    Unwatermarked video
  28. Set Variable
    unwatermarked
  29. Choose from Menu
    Audio
  30. Set Variable
    music
  31. Choose from Menu
  32. Show Notification
    Downloading "…" by …
  33. Get Contents of URL
    …
  34. Get Type
  35. If
  36. Set Variable
    video
  37. If
  38. Get Contents of URL
    …
  39. Get Type
  40. If
  41. Set Variable
    video
  42. If
  43. Get Contents of URL
    …
  44. Get Type
  45. If
  46. Set Variable
    video
  47. If
  48. Show Notification
    Error - This TikTok cannot be downloaded
  49. Stop This Shortcut
  50. Set Name
  51. Quick Look
  52. If
  53. Save File
  54. If
  55. Save to Photo Album

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#include 'actions/web'
#define color red
#define glyph filmstrip

/*
DTikTok
made by user/heismauri on RoutineHub
*/
const Dictionary = {
	"DTikTok": {
		"api": "https://godownloader.com/api/download",
		"dictionary": "(?\u003c=\u003cscript id=\"__NEXT_DATA__\" type=\"application\\/json\"\u003e)(.*?)(?=\u003c\\/script\u003e)",
		"id": "(?\u003c=(v\\/|video\\/))\\d+",
		"main": "https://godownloader.com/tiktok/"
	},
	"ID": 5870,
	"Name": "DTikTok",
	"Version": "2.1.1"
}
const ContentsOfURL = downloadURL("https://routinehub.co/api/v1/shortcuts/{Dictionary['ID']}/versions/latest")
const LatestVersion = getValue(ContentsOfURL, "Version")

if LatestVersion != Dictionary['Version'] {
	const UpdatePrompt = "An update is available for \\"{Dictionary['Name']}\\"\n\nRelease notes: \n{ContentsOfURL['Notes']}\n\n{Dictionary['Version']} → {ContentsOfURL['Version']}"
	menu UpdatePrompt {
	item "Update now":
		const URL = url("https://routinehub.co/download/{ContentsOfURL['id']}")
		openURL(URL)
	item "Update later":
	}
}

if ShortcutInput {
	@url = ShortcutInput
} else {
	getClipboard()
}
@url
expandURL(@url)
const id = containsText(, Dictionary['DTikTok.id'])
url("{Dictionary['DTikTok.main']}{id}")
const ContentsOfURL1 = downloadURL()
makeHTML(ContentsOfURL1, true)
const Matches = containsText(, Dictionary['DTikTok.dictionary'])

menu "What would you like to download?" {
item "Original video":
	@original = getDictionary(Matches)
item "Unwatermarked video":
	@unwatermarked = DTikTok['props.pageProps.token.nwm']
item "Audio":
	@music = DTikTok['props.pageProps.token.music']
item :
}
showNotification("Downloading \"{DTikTok['props.pageProps.data.title']}\" by {DTikTok['props.pageProps.data.author']}", Dictionary['Name'])
const ContentsOfURL2 = formRequest(Dictionary['DTikTok.api'], "POST", {
	"t": "{token}"
})
const Type = typeOf(ContentsOfURL2)

if Type contains "Media" {
	@video = ContentsOfURL2
} else {
	const ContentsOfURL3 = formRequest(Dictionary['DTikTok.api'], "POST", {
		"t": "{DTikTok['props.pageProps.token.hevc']}"
	})
	const Type1 = typeOf(ContentsOfURL3)
	if Type1 contains "Media" {
		@video = ContentsOfURL3
	} else {
		const ContentsOfURL4 = formRequest(Dictionary['DTikTok.api'], "POST", {
			"t": "{DTikTok['props.pageProps.token.wm']}"
		}, {})
		const Type2 = typeOf(ContentsOfURL4)
		if Type2 contains "Media" {
			@video = ContentsOfURL4
		} else {
			showNotification("Error - This TikTok cannot be downloaded", Dictionary['Name'])
			stop()
		}
	}
}
const RenamedItem = setName(@video, id)
quicklook(RenamedItem)

if RenamedItem['File Extension'] contains "mp3" {
	saveFilePrompt(RenamedItem)
} else {
	savePhoto(RenamedItem)
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Ça pourrait aussi te plaire

Tout afficher
Publicité