【发布时间】:2022-12-28 02:05:18
【问题描述】:
I'm using YouTube Data API V3 to extract info about my YouTube channel. I'd like to identify Shorts so I can analyze them separately. I've found in another discussion a solution which is to do a head request at "https://www.youtube.com/shorts/videoId" as it should redirect the URL if it's not a short and it should not if it is one.
Unfortunately, regardless of if I'm passing a Short or not I get <Response [302]>. I suspect this is because I'm in the EU and if I try to access the URL without being logged-in I'm redirected to the cookie consent page: https://consent.youtube.com/m?continue=https%3A%2F%2Fwww.youtube.com%2Fshorts%2F-2mHZGXtXSo%3Fcbrd%3D1&gl=DE&m=0&pc=yt&uxe=eomty&hl=en&src=1
Is that the case? If so, is there any workaround? (aside from a VPN)
Thanks in advance, I would have gladly commented on the other discussion instead of creating another topic but I'm a simple lurker with no reputation so I can't comment
Here is the original conversation: how do i get youtube shorts from youtube api data v3
【问题讨论】:
-
You can try to read the hashtags of the video and if there is a #shorts then that would mean that it's a short
-
Thanks I'll do that for now. Apparently it is no longer mandatory to add Short in the tags though, so it might not work 100% of the time but it's still much better than nothing
-
By
EUyou mean Europe, correct? If so, it looks like a weird behavior as I am also in Europe and not experiencing this issue. If you are still encountering this issue and interested to solve this problem, don't hesitate to contact me to try to debug things together.