ShareShortcuts
Fork “DTikTok”

Har du bygget noget nyt oven på denne genvej? Del den som en fork: den bliver din egen genvej, som du styrer, og begge sider linker til hinanden, så aabbccddeeffgg2000 får kredit.

  1. 1Hent genvejen og ret den i Genveje-appen. Giv den sit eget navn.
  2. 2Del den fra Genveje-appen og kopiér iCloud-linket.
  3. 3Kom tilbage hertil, indsæt linket og beskriv, hvad der er anderledes, fx “Tilføjet et trin, der bruger Apple Intelligence til at gøre teksten mere personlig.”
Downloads
60K
Gemt
0
Handlinger
55
Kategori
API
Version
1.0
Sprog
EN

Forhåndsvisning

Nyheder

Version 1.0

First release

Versionshistorik
1.0 7. dec. 2022

First release

Hvad den gør

55 handlinger
  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

Vis som kode
Beta

Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.

#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)
}
Åbn i Cherri Playground Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.

Bedømmelser og anmeldelser

Skriv en anmeldelse
–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ingen anmeldelser endnu. Vær den første!

Annonce

Du vil måske også kunne lide

Se alle
Annonce