jnjknk
Nyheder
Version 1.0
First release
Hvad den gør
138 handlinger-
CommentDownloads photos and videos from posts, stories, igtv or reels—public or private—in Instagram or Safari on iPhone or iPad. 2021-04-16 v1.1 u/gluebyte https://routinehub.co/shortcut/7823
-
Dictionary
-
Get Dictionary Value
-
List
-
Set VariablemainDict
-
Random Number
-
If
-
Get Contents of URLhttps://updatecheck.gluebyte.workers.dev/?id=DF1910A2
-
If
-
Choose from Menu✴️ New Version Available ✴️…
-
Choose from MenuGo to RoutineHub
-
Open URLs
-
Stop This Shortcut
-
Choose from MenuDownload Update
-
Get Contents of URLhttps://routinehub.co/api/v1/shortcuts/7823/versions/latest
-
URLhttps://routinehub.co/download/…
-
Open URLs
-
Stop This Shortcut
-
Choose from MenuNot Now
-
Replace Text
-
If
-
Show Result
-
Stop This Shortcut
-
Get Type
-
Get Type
-
If
-
If
-
If
-
Get Contents of URL…
-
Make HTML from Rich Text
-
Replace Text
-
If
-
Get Variable
-
If
-
Text
-
Make Rich Text from Markdown
-
Make HTML from Rich Text
-
Replace Text
-
Replace Text
-
URL……
-
If
-
URLdata:text/html,<body onload="location='…'"/>
-
Open URLs
-
Stop This Shortcut
-
Replace Text
-
Get Contents of URL…
-
If
-
If
-
If
-
Text
-
If
-
Get Contents of URL…
-
Make HTML from Rich Text
-
If
-
Make HTML from Rich Text
-
If
-
Replace Text
-
If
-
Replace Text
-
If
-
Nothing
-
Replace Text
-
If
-
Replace Text
-
If
-
If
-
If
-
Make Rich Text from Markdown
-
Make HTML from Rich Text
-
Replace Text
-
Replace Text
-
Replace Text
-
URL……
-
If
-
URLdata:text/html,<body onload="location='…'"/>
-
Open URLs
-
Stop This Shortcut
-
If
-
Number
-
If
-
If
-
If
-
Number
-
If
-
Show Result
-
Run JavaScript on Web Page
-
Stop This Shortcut
-
Replace Text
-
If
-
Replace Text
-
If
-
Replace Text
-
If
-
Nothing
-
If
-
Replace Text
-
Text
-
Replace Text
-
Replace Text
-
If
-
Replace Text
-
If
-
Replace Text
-
Replace Text
-
Replace Text
-
Count
-
If
-
If
-
If
-
Make Rich Text from Markdown
-
Make HTML from Rich Text
-
Replace Text
-
Replace Text
-
Replace Text
-
URL……
-
If
-
URLdata:text/html,<body onload="location='…'"/>
-
Open URLs
-
If
-
Show Alert
-
Stop This Shortcut
-
Get Contents of URL…
-
If
-
Choose from List
-
Count
-
Replace Text
-
If
-
Replace Text
-
If
-
Text
-
If
-
Text
-
Set Name
-
If
-
Repeat with Each
-
Text
-
Set Name
-
Save to Photo Album
Vis som kode
Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.
#include 'actions/web'
#define color green
#define glyph cameraViewFinder
/*
Downloads photos and videos from posts, stories, igtv or reels—public or private—in Instagram or Safari on iPhone or iPad.
2021-04-16 v1.1 u/gluebyte
https://routinehub.co/shortcut/7823
*/
const Dictionary = {
"Show Safari Instructions": true
}
const ShowInstructions = getValue(Dictionary, "")
list()
@mainDict
const RandomNumber = randomNumber(1, 3)
if RandomNumber == 1 {
const ContentsOfURL = downloadURL("https://updatecheck.gluebyte.workers.dev/?id=DF1910A2")
if ContentsOfURL !contains @mainDict['version'] {
menu "✴️ New Version Available ✴️{ContentsOfURL}" {
item "Go to RoutineHub":
openURL("https://routinehub.co/shortcut/7823/")
stop()
item "Download Update":
downloadURL("https://routinehub.co/api/v1/shortcuts/7823/versions/latest")
const URL = url("https://routinehub.co/download/{['id']}")
openURL(URL)
stop()
item "Not Now":
}
}
}
const Shortcode = replaceText("^.*instagram.com/(?:p|s|stories|tv|reel)/.*?([^/]+)[/?][^/]*$", "$1", "ㅁ{ShortcutInput}", true)
if Shortcode beginsWith "ㅁ" {
show("Please share post or stories.\n{ShortcutInput}")
stop()
}
const URLType = typeOf(ShortcutInput)
const Type = typeOf(ShortcutInput)
if Type == URLType {
if ShortcutInput contains "instagram.com/s" {
if ShortcutInput contains "instagram.com/s/" {
const ContentsOfURL1 = downloadURL(ShortcutInput)
makeHTML(ContentsOfURL1)
replaceText("(?s)^.+\"username\":\"([^\"]+).+$", "https://instagram.com/$1", true)
} else {
// TODO: Get Variable not supported: Assign variable here to 'ShortcutInput'.
}
if ShowInstructions == {
const Text = "## Download Story\n\nYou can download story after logging in using Safari.\n\n1. Tap the **Open Story** link below.\n2. Pause the story with the ⏸ button on the top right side of the story or the **···** button at the bottom next to *Send Message*.\n\t* You can ignore whatever appears on screen as long as story does not progress to the next one.\n3. Run **Instagram Download** by tapping {@mainDict['share']} in Safari.\n4. Close this tab."
const RichTextFromMarkdown = getRichTextFromMarkdown(Text)
makeHTML(RichTextFromMarkdown)
replaceText("❰URL❱", "{}{@mainDict['footer']}")
replaceText("❰TYPE❱", "Story")
url("{@mainDict['header']}{}")
} else {
url("data:text/html,<body onload=\"location='{}'\"/>")
}
openURL(IfResult)
stop()
}
replaceText("\?.*$", "?__a=1", "{ShortcutInput}?", true)
const ContentsOfURL2 = downloadURL()
if ContentsOfURL2 beginsWith "{\"graphql\":" {
} else {
if ContentsOfURL2 == "{}" {
} else {
const ContentsOfURL3 = downloadURL(ShortcutInput)
makeHTML(ContentsOfURL3)
}
}
} else {
makeHTML(ShortcutInput)
}
if ShortcutInput contains "instagram.com/stories/" {
const UpdatedText = replaceText("(?s)^.+src=\"(https[^\"]+instagram[^\"]+\.mp4[^\"]*).+$", "$1", "ㅁ{FullHTML}", true)
if UpdatedText beginsWith "ㅁ" {
const UpdatedText1 = replaceText("^[\s\S]+?src(?:set)?=\"(https[^\" ]+?instagram((?!/[ps]\d{3,4}x\d{3,4}/)[^\" ])+?\.jpg[^\" ]*)[\s\S]+$", "$1", "ㅁ{FullHTML}", true)
if UpdatedText1 beginsWith "ㅁ" {
}
}
replaceText("&", "&")
} else {
const html = replaceText("(?s)^.+\"graphql\":([^\n]+).+$", "$1", "ㅁ{FullHTML}", true)
if Type == URLType {
if FullHTML contains "\"is_private\":true" {
if ShowInstructions == {
const RichTextFromMarkdown1 = getRichTextFromMarkdown(@mainDict)
makeHTML(RichTextFromMarkdown1)
replaceText("❰SHARE❱", @mainDict['share'])
replaceText("❰URL❱", ShortcutInput, "{}{@mainDict['footer']}")
replaceText("❰TYPE❱", "Private Post")
url("{@mainDict['header']}{}")
} else {
url("data:text/html,<body onload=\"location='{ShortcutInput}'\"/>")
}
openURL(IfResult1)
stop()
}
} else {
if html beginsWith "ㅁ" {
} else {
if html contains "\"shortcode\":\"{Shortcode}\"" {
}
}
if IfResult2 == "" {
show("Webpage needs to be reloaded. Please run the shortcut again.")
runJavaScriptOnWebpage("location.reload();\ncompletion();")
stop()
}
}
const UpdatedText2 = replaceText("^.+\"edge_sidecar_to_children\":", "", "ㅁ{html}", true)
if UpdatedText2 beginsWith "ㅁ" {
const UpdatedText3 = replaceText("^.+\"video_url\":\"([^\"]+instagram[^\"]+\.(jpg|mp4)[^\"]*).+$", "$1", UpdatedText2, true)
if UpdatedText3 beginsWith "ㅁ" {
const UpdatedText4 = replaceText("^.+\"display_url\":\"([^\"]+instagram[^\"]+\.(jpg|mp4)[^\"]*).+$", "$1", UpdatedText3, true)
if UpdatedText4 beginsWith "ㅁ" {
}
}
} else {
replaceText("\"edge_related_profiles\":.+$", "", UpdatedText2, true)
const n = "\n"
replaceText(".*?\"(?:display|video)_url\":\"([^\"]+instagram[^\"]+\.(jpg|mp4)[^\"]*)", "$1{n}", true)
replaceText("\n\".*$", "", true)
if ContentsOfURL2 beginsWith "{\"graphql\":" {
replaceText("(.+\.mp4.*)\n.+\.jpg.*", "$1", true)
} else {
replaceText(".+\.jpg.*\n(.+\.mp4.*)", "$1", true)
}
}
replaceText("\u0026", "&")
replaceText("\/", "/")
}
const Count = count(IfResult3, "Lines")
if !IfResult3 {
if Type == URLType {
if ShowInstructions == {
const RichTextFromMarkdown2 = getRichTextFromMarkdown(@mainDict)
makeHTML(RichTextFromMarkdown2)
replaceText("❰SHARE❱", @mainDict['share'])
replaceText("❰URL❱", ShortcutInput, "{}{@mainDict['footer']}")
replaceText("❰TYPE❱", "Post")
url("{@mainDict['header']}{}")
} else {
url("data:text/html,<body onload=\"location='{ShortcutInput}'\"/>")
}
openURL(IfResult4)
} else {
confirm("Media not found. Please report to developer if problem persists.")
}
stop()
}
const ContentsOfURL4 = downloadURL(IfResult3)
if Count > 1 {
chooseFromList(ContentsOfURL4, true, true)
}
const Count1 = count(IfResult5)
const UpdatedText5 = replaceText("(?s)^.*\"username\":\"([^\"]+)\",\"(?:is_private|blocked_by_viewer)\".*$", "$1", "ㅁ{FullHTML}", true)
if UpdatedText5 beginsWith "ㅁ" {
const UpdatedText6 = replaceText("(?s)^.*?<img alt=\"([^'\"]+)['\"].*$", "$1", "ㅁ{FullHTML}", true)
if UpdatedText6 beginsWith "ㅁ" {
}
}
if Count1 == 1 {
setName(IfResult5)
} else {
for _ in IfResult5 {
setName(@RepeatItem)
}
}
savePhoto(IfResult6)
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
Mere fra lulu
Du vil måske også kunne lide
Annonce