Login About Gallery
Media Grabber
Accepts
URLs
COMMENT
Version : 1.3.3 Github : @MediaGrabber Telegram : @ShortcutsApps || Made with ❤️ by Sayem ||
COMMENT
A partial list of supported sites is available here: https://kutt.it/mgsites Report any issue on github.
SCRIPTING
If
Shortcut Input
contains
Shortcut Input
Otherwise
SHARING
Get clipboard
TEXT
Match
https?://.*
in
Clipboard
Case Sensitive
COMMENT
Keep it to yes to suppress url prompts. It is helpful when your run from widget for background downloads.
TEXT
No
VARIABLES
Set variable
WidgetMode
to
Text
SCRIPTING
If
WidgetMode
contains
Yes
Otherwise
SCRIPTING
Ask
Enter url or query
Input Type
Text
Default Answer
End If
End If
TEXT
Match
^.+?(?=\&t|\&list)|^.*
in
If Result
Case Sensitive
VARIABLES
Set variable
InputURL
to
Matches
TEXT
Match
.*(twitter.com|vk.com|dailymotion.com|dai.ly|alive.in.th|weibo.cn|ubicast.tv|apple.com|funnyordie.com|tumblr.com|videofy.me|orfium.com|spreaker.com|smosh.com|mirror.co.uk|manchestereveningnews.co.uk|pbslearningmedia.org|livestreamfails.com|zeit.de|stream.me).*
in
InputURL
Case Sensitive
SCRIPTING
URL
Get
Scheme
from
Matches
TEXT
Match
twitter.com|tumblr.com|dailymotion.com
in
Component of URL
Case Sensitive
SCRIPTING
SCRIPTING
If
Matches
is
twitter.com
TEXT
Match
[0-9]{16,}
in
InputURL
Case Sensitive
URL
https://api.twitter.com/1.1/statuses/show.json?tweet_mode=extended&id=
Text Matches
NETWORK
Get contents of
URL
Options Under Construction
End If
SCRIPTING
If
If Result
is
tumblr.com
TEXT
Match
[0-9]{12,}
in
InputURL
Case Sensitive
URL
https://api.tumblr.com/v2/blog/
Component of URL
/posts/video?api_key=rdlmV7PoHOUVOPPGutXaQ1QkO7xDRZENPKiWAgKWTXooeqwo7M&id=
Text Matches
NETWORK
Get contents of
URL
Options Under Construction
End If
SCRIPTING
If
If Result
is
dailymotion.com
URL
InputURL
&locale=en&integration=inline&GK_PV5_NEON=1
NETWORK
Get contents of
URL
Options Under Construction
DOCUMENTS
Make HTML from
Contents of URL
Make Full Document
End If
Otherwise
NETWORK
Get contents of
InputURL
Options Under Construction
DOCUMENTS
Make HTML from
Contents of URL
Make Full Document
End If
DOCUMENTS
Replace
\
with
World
in
If Result
Case Sensitive
Regular Expression
DOCUMENTS
Replace
href="/
with
Component of URL
/
in
Replace Text
Case Sensitive
Regular Expression
WEB
Get URLs from
Replace Text
TEXT
Combine
URLs
with
New Lines
DOCUMENTS
Replace
(?sm)(^[^\r\n]*)[\r\n](?=.*^\1)
with
World
in
Text
Case Sensitive
Regular Expression
TEXT
Match
(https?).*?(\.mp4|/video_file/|\.m4v|\.mov|\.mp3|\.aac|\.m4a).*
in
Replace Text
Case Sensitive
SCRIPTING
Repeat with each item in
Matches
TEXT
Match
mp4|mp3|m4a|aac|m4v|mov+$
in
Repeat Item
Case Sensitive
SCRIPTING
Otherwise
TEXT
mp4
End If
VARIABLES
Set variable
FileEXT
to
If Result
TEXT
{"format":"
Repeat Index
- unknown","filesize":0,"ext":"
FileEXT
","url":"
Repeat Item
"}
VARIABLES
Add
Text
to
DictInfo
End Repeat
End If
COMMENT
Get json results from our backend server. The json results include all the information needed to download videos.
SCRIPTING
Count
Items
in
If Result
SCRIPTING
If
Count
is
0
TEXT
aHR0cDovL3l0LmdldGh0dHAub25saW5lL2luZm8=
SCRIPTING
Decode
Text
with base64
NETWORK
Get contents of
Base64 Encoded
Options Under Construction
VARIABLES
Set variable
FetchedJSON
to
Contents of URL
SCRIPTING
If
FetchedJSON
contains
"error"
COMMENT
Errors have json value. This errors are usually from youtube-dl installed on backend server. Errors will be displayed with alert option.
SCRIPTING
Show alert
FetchedJSON
Title
FetchedJSON
Show Cancel Button
SCRIPTING
If
FetchedJSON
contains
update_url
URL
FetchedJSON
SCRIPTING
Open
URL
with x-callback
Options Under Construction
SCRIPTING
Wait
2 seconds
End If
VARIABLES
Set variable
Alert
to
If Result
Otherwise
COMMENT
Parse json for getting information on video url, title and formats.
SCRIPTING
Get dictionary from
FetchedJSON
VARIABLES
Set variable
DictInfo
to
Dictionary
SCRIPTING
If
DictInfo
contains
"mgalert":
SCRIPTING
Show alert
Informational Message
Title
optional
Show Cancel Button
End If
SCRIPTING
Count
DictInfo
in
If Result
SCRIPTING
If
Count
is greater than
1.0
SCRIPTING
Repeat with each item in
DictInfo
TEXT
Repeat Item
SCRIPTING
Set name of
Text
to
Repeat Item
VARIABLES
Add
Set Name
to
ChooseDict
End Repeat
SCRIPTING
Choose from
ChooseDict
Prompt
Choose a video
Select Multiple
VARIABLES
Set variable
DictInfo
to
Selected Item
End If
COMMENT
Remove any illegal characters from title and replace with "_" for saving file.
TEXT
DictInfo
DOCUMENTS
Replace
[/:|;",\\*']
with
_
in
Text
Case Sensitive
Regular Expression
VARIABLES
Set variable
DictTitle
to
Replace Text
TEXT
DictInfo
VARIABLES
Set variable
Headers
to
Text
SCRIPTING
Get
Value
for
formats
in
DictInfo
VARIABLES
Set variable
Formats
to
Dictionary Value
COMMENT
Check if json results only have one single video or multiple.

Showcuts

Magic Vars

Screenshot

Submitted Anonymously 3 years ago

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

1

161 more actions