Thank you for sharing this Shortcut on ShareShortcuts.com 🦄
The shortcut first makes sure you are running the current version of the shortcut to prevent you from requesting something from the server that might have potentially been changed. Then, it asks what you would like to search on youtube. It then sends this data to my personally hosted server that web scrapes Youtube for the title and links and it returns them as a dictionary to be used in the Shortcut. After that, it asks which one would you like to watch which would send your word "number" to my server so it can translate it to an actual number to be used to get the url from the dictionary received earlier. Finally, it goes through the dictionary to check if it finds the a match from the number you said with the number used as the increment and if it finds a match it will open the link in that current iteration of the dictionary.
Nyheder
First release
Hvad den gør
73 handlinger-
CommentUPDATE: Fixed an issue with the word matching while using variables, I have now switched to a dictionary which is more effective.
-
CommentHi! Thank you for downloading my shortcut, I tried to leave comments in the most important sections so you can understand better of what's going on. Feel free to contact me for questions, suggestions or to just chat! Reddit:u/mawesome4ever, discord:…
-
Text
-
Set VariableBaseUrl
-
Text
-
URL…/version
-
Get Contents of URL
-
If
-
Show AlertNew Version!
-
URL…
-
Open URLs
-
If
-
CommentTop three variables are important, don't edit them or remove them.
-
CommentIncr is used to number the search results as well as to get back the item the user chose
-
Text
-
Set VariableIncr
-
CommentList is used to store the search results as text so it can speak it back to the user, list will be something like Number 1, gummy bear. Number 2, gummy. Number 3, gum.
-
Text
-
Set VariableList
-
Text
-
Speak Text
-
Dictate Text
-
CommentReplace Text replaces each space with a plus sign since URLs don't like spaces... 🤔I could also just use the Url Encode item, but eh, I don't want to drag it all the way up here 😭😆
-
Replace Text
-
Set VariableSearchFor
-
CommentThis is the core part of the shortcut, it sends the link to my personally hosted server to web scrape YT for the video title and links. Please don't spam it, it's very fragile 😕
-
URL…/links
-
Get Contents of URL
-
CommentThe output is a JSON object as: {{"title1":"url1"},{"title2":"url2"},{"title3":"url3"}}
-
Get Dictionary from Input
-
Set VariableDiction
-
If
-
Text
-
Speak Text
-
If
-
Repeat with Each
-
CommentWhile looping through the dictionary, it will output the item so we save it in a variable
-
Set VariableItem
-
If
-
If
-
Get Variable
-
If
-
Text
-
Add to Variable
-
Text
-
Add to Variable
-
Get Variable
-
Calculate
-
Set VariableIncr
-
If
-
Text
-
Speak Text
-
Get Variable
-
Speak Text
-
Dictate Text
-
CommentUsing my personally hosted server this time to translate the word into a number and returns that number to get the item from the list. Again, please don't spam it, it's very fragile 😕
-
URL…/word
-
Get Contents of URL
-
Set VariableUserChose
-
If
-
Text
-
Speak Text
-
If
-
Get Variable
-
Get Dictionary from Input
-
Repeat with Each
-
Get Dictionary from Input
-
Set VariableTestin
-
Text
-
If
-
URLhttps://m.youtube.com…
-
Open URLs
-
Stop This Shortcut