ShareShortcuts
Fork “Search YT”

Har du bygget noget nyt oven på denne genvej? Del den som en fork: den bliver din egen genvej, som du styrer, og begge sider linker til hinanden, så den oprindelige skaber får kredit.

  1. 1Hent genvejen og ret den i Genveje-appen. Giv den sit eget navn.
  2. 2Del den fra Genveje-appen og kopiér iCloud-linket.
  3. 3Kom tilbage hertil, indsæt linket og beskriv, hvad der er anderledes, fx “Tilføjet et trin, der bruger Apple Intelligence til at gøre teksten mere personlig.”
Downloads
75K
Gemt
0
Handlinger
73
Kategori
Foto og video
Version
1.0
Sprog
EN

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

Version 1.0

First release

Versionshistorik
1.0 7. okt. 2018

First release

Hvad den gør

73 handlinger
  1. Comment
    UPDATE: Fixed an issue with the word matching while using variables, I have now switched to a dictionary which is more effective.
  2. Comment
    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:…
  3. Text
  4. Set Variable
    BaseUrl
  5. Text
  6. URL
    …/version
  7. Get Contents of URL
  8. If
  9. Show Alert
    New Version!
  10. URL
    …
  11. Open URLs
  12. If
  13. Comment
    Top three variables are important, don't edit them or remove them.
  14. Comment
    Incr is used to number the search results as well as to get back the item the user chose
  15. Text
  16. Set Variable
    Incr
  17. Comment
    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 1, gummy bear. Number 2, gummy. Number 3, gum.
  18. Text
  19. Set Variable
    List
  20. Text
  21. Speak Text
  22. Dictate Text
  23. Comment
    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 😭😆
  24. Replace Text
  25. Set Variable
    SearchFor
  26. Comment
    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 😕
  27. URL
    …/links
  28. Get Contents of URL
  29. Comment
    The output is a JSON object as: {{"title1":"url1"},{"title2":"url2"},{"title3":"url3"}}
  30. Get Dictionary from Input
  31. Set Variable
    Diction
  32. If
  33. Text
  34. Speak Text
  35. If
  36. Repeat with Each
  37. Comment
    While looping through the dictionary, it will output the item so we save it in a variable
  38. Set Variable
    Item
  39. If
  40. If
  41. Get Variable
  42. If
  43. Text
  44. Add to Variable
  45. Text
  46. Add to Variable
  47. Get Variable
  48. Calculate
  49. Set Variable
    Incr
  50. If
  51. Text
  52. Speak Text
  53. Get Variable
  54. Speak Text
  55. Dictate Text
  56. Comment
    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 😕
  57. URL
    …/word
  58. Get Contents of URL
  59. Set Variable
    UserChose
  60. If
  61. Text
  62. Speak Text
  63. If
  64. Get Variable
  65. Get Dictionary from Input
  66. Repeat with Each
  67. Get Dictionary from Input
  68. Set Variable
    Testin
  69. Text
  70. If
  71. URL
    https://m.youtube.com…
  72. Open URLs
  73. Stop This Shortcut

Bedømmelser og anmeldelser

Skriv en anmeldelse
–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings
12. okt. 2018
danielbahl

Thank you for sharing this Shortcut on ShareShortcuts.com 🦄

Annonce

Du vil måske også kunne lide

Se alle
Annonce