Well-Crafted - Thanks for sharing 😎
TL;DR : Say what you'd like to watch, shortcut searches YouTube, top 5 results get spoken to you, you reply with the number that you would like to watch, shortcut opens the video right away in YouTube... Longer version: You ask the shortcut what you would like to watch, shortcut then sends this info to my server which then web scrapes YouTube for this search results and only gets the title and the links then it returns it to the Shortcut as a dictionary Once the shortcut recieves this info, it numbers them so the user can easily just pick a number which then it presents this numbered data to the user so they may choose one. After the user has chosen and replied with the number, the Shortcut then sends this data to my server which will translate the "word number" into an integer (currently max is 10) which the server then just replies with the number. Finally, when the Shortcut recieves the integer the Shortcut then matches the translated number with incremental value that is stored in a variable that signifies the current iteration of the dictionary returned earlier and if they both match it returns the Value off of the Key-Value pair from the dictionary.
Novedades
First release
Qué hace
88 acciones-
CommentUPDATE: Fixed an issue with error catching, where if it found an error in one of the dictionary search results it would completely fail the query.
-
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. FoundLink = If it finds a link it'll set it to true and not notify the user it didn't find one
-
Text
-
Set VariableFoundLink
-
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 0, gummy bear. Number 1, gummy. Number 2, 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
-
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
-
Text
-
Set VariableIncr
-
Get Variable
-
Repeat with Each
-
Set VariableItem
-
Get Variable
-
If
-
Get Variable
-
If
-
Text
-
Speak Text
-
If
-
URLhttps://m.youtube.com…
-
Open URLs
-
Text
-
Set VariableFoundLink
-
If
-
Get Variable
-
Calculate
-
Set VariableIncr
-
Get Variable
-
If
-
Text
-
Speak Text
-
If