UPDATE: 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.
Hi! 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: mawesome4ever#4987 (or with <@ 209748356912775168>)
Top 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
Incr is used to number the search results as well as to get back the item the user chose
List 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.
Replace 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 ðŸ˜ðŸ˜†
This 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 😕
The output is a JSON object as:
{{"title1":"url1"},{"title2":"url2"},{"title3":"url3"}}
While looping through the dictionary, it will output the item so we save it in a variable
Using 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 😕