AutoNotification [HELP] Is it possible to obtain youtube video link from notification?

Discussion in 'AutoApps' started by francesco, Dec 10, 2017.

  1. francesco

    francesco Member

    Joined:
    Jun 13, 2017
    Messages:
    33
    Likes Received:
    0
    Hey everyone, I've been trying to create a new profile that takes note of every notification from a particular youtuber I get and then reproduces the videos whenever i decide to do so (at the end of the day)

    The only problem I'm facing is not being able to get youtube's video URL.
    When i try to use autonotification to retrieve the link, I can't really find any variable that stores it (am I wrong/blind?)

    If there actually isn't any variable that does the job, Is there any other way that this could be accomplished in?

    thanks in advance
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi. Unfortunately the YouTube notifications don't have the URL embedded anywhere in them, I just checked :)
    What you could do is try using the YouTube API in AutoWeb to fetch data on that particular youtuber so you can get his/her videos :)
     
  3. francesco

    francesco Member

    Joined:
    Jun 13, 2017
    Messages:
    33
    Likes Received:
    0
    hey, thanks for checking this out!
    I'll check out the autoweb app :)
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thank you :) It's in beta right now. You can get it here.
     
  5. francesco

    francesco Member

    Joined:
    Jun 13, 2017
    Messages:
    33
    Likes Received:
    0
    Can I go a little offtopic here?
    I just downloaded the autoweb app and I'm currently using it. I did encounter a problem (bug maybe?)
    I successfully set up the task to find the youtube video I want and it does its job in finding it.
    Now the problem is: the link i'm provided with is the one of the thumbnail rather than of the video itself.
    Well, no problem then I'll just take the video id and use it for my needs; the video ID doesn't work though, when i try to check if I it works (via a toast notification) i only get a blank area

    Is this a api problem or am i doing something wrong?
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please export your task's description (not xml) so I can take a look? Long-click the task in Tasker->export description Thanks in advance
     
  7. francesco

    francesco Member

    Joined:
    Jun 13, 2017
    Messages:
    33
    Likes Received:
    0
    Code (Text):

    Latest NL video (125)
        A1: AutoWeb Web Service [ Configuration:API: YouTube
    API Action: Get channel's videos
    Case Insensitive: true
    Contains All: true
    Part: contentDetails
    Max Results: 10
    Channel Id: UC3tNpTOHsTnkmbwztCs30sA
    Filter Title: isaac Timeout (Seconds):120 ]
        A2: Flash [ Text:%title() || %videoid() Long:On ]

     
    This is the task I'm using, the A2 is the flash I'm using to check the variables
    Note that I set "part" as "contentDetails" like requested but this way no variable works. Ifibcjsngr it back to snippet the only one not working is videoid
     
    Last edited: Dec 12, 2017
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    So what shows up in %videoid() on that task when you run it?
     
  9. francesco

    francesco Member

    Joined:
    Jun 13, 2017
    Messages:
    33
    Likes Received:
    0
    https://i.imgur.com/MQCeW7u.png
    this is the result of the whole task, I did also try writing the variable into a (binary and not) file to see if that worked but I get an empty .txt
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please enable system logs and then call the webservice again to see what it responds in the AutoWeb logs? thanks!
     
  11. francesco

    francesco Member

    Joined:
    Jun 13, 2017
    Messages:
    33
    Likes Received:
    0
    Received response: { "kind": "youtube#activityListResponse", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/VHKnZcMV1cCL6s166X-Pv4d_9Ok\"", "nextPageToken": "CAoQAA", "pageInfo": { "totalResults": 30, "resultsPerPage": 10 }, "items": [ { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/A4BP_9lwni5tIgJ2Nw9ZeCWzMDY\"", "id": "VTE1MTMwMjYwMDE5NDcwODEyMDE3MDA2NA==", "contentDetails": { "upload": { "videoId": "NbG8Jy680oM" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/2soYeRG1TNfiNfV1mlvqNRCgKOY\"", "id": "VTE1MTMwMjYwMDE5NDcwODEyMTcxOTE4NA==", "contentDetails": { "upload": { "videoId": "Guuxbofx5TQ" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/Uz5AyOhufOxMdiAwGgq64_IHotk\"", "id": "VTE1MTMwMjI0MDI5NDcwODEyMTcxOTgyNA==", "contentDetails": { "upload": { "videoId": "sn4iBeCm3JM" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/aaKPBiqLuhmF-6vyIQ8RjXSh7mQ\"", "id": "VTE1MTMwMTg4MDA5NDcwODEyMTcxOTUwNA==", "contentDetails": { "upload": { "videoId": "a4rBi8KUFas" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/QtN5I3FmfQb3fOJIDX-8DabH-n0\"", "id": "VTE1MTMwMTE2MTE5NDcwODM1MDA4MDcyMA==", "contentDetails": { "upload": { "videoId": "sCSCTMpKwJY" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/N0QLA5BCkQQ-p_w1PvUZUMsLhCU\"", "id": "VTE1MTMwMDA4MDM5NDcwODM1MDA3OTc2MA==", "contentDetails": { "upload": { "videoId": "MMndsa_2xZY" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/jEW34C4WeExSZ-8Dg5uo9F2qJIE\"", "id": "VTE1MTI5NTIxMzQ5NDcwODA5Mjc5MTY5Ng==", "contentDetails": { "upload": { "videoId": "rlZR3OrR1Jw" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/1cn6_-yysGtG13SIiSDAgJqZX08\"", "id": "VTE1MTI5Mzk2MDE5NDcwODA5Mjc5MTM3Ng==", "contentDetails": { "upload": { "videoId": "o0yA0IHJWzw" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/Kers221uOe5CTXy6-s2anuSqH7M\"", "id": "VTE1MTI5MzYwMDA5NDcwODA3MTE2MTU1Mg==", "contentDetails": { "upload": { "videoId": "IDwVAPnGMsY" } } }, { "kind": "youtube#activity", "etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/VZKhO8GEaAIPrjdMkt_Fe4DTigk\"", "id": "VTE1MTI5MjUyMDQ5NDcwODIyNDU4OTQ1Ng==", "contentDetails": { "upload": { "videoId": "bxwt9t-i_K8" } } } ]}
    this should be the log you are looking for, if not let me know and i'll get the correct one
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thanks! Can you try disabling the "Contains All" and "Case Insensitive" options? I just tried it and it worked for me.
     
  13. francesco

    francesco Member

    Joined:
    Jun 13, 2017
    Messages:
    33
    Likes Received:
    0
    Hey thanks for the help!
    The profile is now working but sadly I couldn't use the way you suggested cause it just did not work :(
    I noticed that whenever I tried to use any filter for the video the app would not return any "id" at all (even with those 2 settings disabled)
    I instead used the thumbnail video address and split the variable in order to obtain the videoid by myself

    So now it's working and i can just ask ok google to play the latest "the binding of isaac" video thanks to autovoice! :D

    thanks a lot for the help once again, always ready and willing to help :)
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Awesome, glad it works for you now! :)
     

Share This Page