ShareShortcuts
Fazer fork de “DTikTok”

Criou algo novo a partir deste atalho? Compartilhe como uma derivação: ela se torna um atalho seu, que você gerencia, e as duas páginas têm links entre si para que aabbccddeeffgg2000 receba o crédito.

  1. 1Obtenha o atalho e altere-o no app Atalhos. Dê a ele um nome próprio.
  2. 2Compartilhe pelo app Atalhos e copie o link do iCloud.
  3. 3Volte aqui, cole o link e descreva o que mudou, por exemplo: “Adicionei uma etapa que usa a Apple Intelligence para personalizar o texto.”
Downloads
60K
Salvo
0
Ações
55
Categoria
API
Versão
1.0
Idioma
EN

Pré-visualização

Novidades

Versão 1.0

First release

Histórico de versões
1.0 7 de dez de 2022

First release

O que ele faz

55 ações
  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

Ver como código
Beta

Todas as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele funciona.

#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)
}
Abrir no Cherri Playground Descompilado com cherri 2.3.0 (GPL-2.0). Pode precisar de pequenos ajustes antes de compilar.

Avaliações e comentários

Escrever uma avaliação
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ainda não há avaliações. Seja o primeiro a compartilhar o que você pensa!

Publicidade

Você também pode gostar

Ver tudo
Publicidade