ShareShortcuts

Search YT

Dupliquer « Search YT »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que le créateur d’origine soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
76K
Enregistré
1
Actions
88
Catégorie
Photos and videos
Version
1.0
Langue
EN

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.

Nouveautés

Version 1.0

First release

Historique des versions
1.0 6 oct. 2018

First release

Ce qu’il fait

88 actions
  1. Comment
    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.
  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. FoundLink = If it finds a link it'll set it to true and not notify the user it didn't find one
  14. Text
  15. Set Variable
    FoundLink
  16. Comment
    Incr is used to number the search results as well as to get back the item the user chose
  17. Text
  18. Set Variable
    Incr
  19. 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 0, gummy bear. Number 1, gummy. Number 2, gum.
  20. Text
  21. Set Variable
    List
  22. Text
  23. Speak Text
  24. Dictate Text
  25. 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 😭😆
  26. Replace Text
  27. Set Variable
    SearchFor
  28. 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 😕
  29. URL
    …/links
  30. Get Contents of URL
  31. Comment
    The output is a JSON object as: {{"title1":"url1"},{"title2":"url2"},{"title3":"url3"}}
  32. Get Dictionary from Input
  33. Set Variable
    Diction
  34. If
  35. Text
  36. Speak Text
  37. If
  38. Repeat with Each
  39. Comment
    While looping through the dictionary, it will output the item so we save it in a variable
  40. Set Variable
    Item
  41. If
  42. If
  43. Get Variable
  44. If
  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. Text
  65. Set Variable
    Incr
  66. Get Variable
  67. Repeat with Each
  68. Set Variable
    Item
  69. Get Variable
  70. If
  71. Get Variable
  72. If
  73. Text
  74. Speak Text
  75. If
  76. URL
    https://m.youtube.com…
  77. Open URLs
  78. Text
  79. Set Variable
    FoundLink
  80. If
  81. Get Variable
  82. Calculate
  83. Set Variable
    Incr
  84. Get Variable
  85. If
  86. Text
  87. Speak Text
  88. If

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
12 oct. 2018
danielbahl

Well-Crafted - Thanks for sharing 😎

Publicité

Ça pourrait aussi te plaire

Tout afficher
Publicité