-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - I cannot download the YouTube videos from some video stream URLs #44
Comments
Getting something similar and for links that were previously working. YouTube(url: url, methods: [.local, .remote]) pattern (ytplayer.config\s*=\s*) failed: The operation couldn’t be completed. (YouTubeKit.YouTubeKitError error 1.) |
Solve it? |
I pushed some fixes. Can you try again with the current |
Hey thanks for responding. I tried again with this function:
And this video URL: https://www.youtube.com/watch?v=qaR9Dl56eHk which the program game me However when I make data from the URL retrieved, Data is nil. Furthermore, when I print the Thanks, Dan. |
@alexeichhorn Your new changes fixed remote url extraction for large videos for me. It also fixed local extraction for both small and large videos. :) Thank you! I believe there was a bug before (not sure about now) where even if I had local extraction priority, and remote as 2nd priority, it wouldn't do remote extraction (because it would download a video with no data and think it succeeded.) |
I am using a function to download a video at a specific URL which relies on YouTubeKit:
However when
videoURL = "https://www.youtube.com/watch?v=byrRbWGN1Nk&t=2s"
theurl
links gives me a 403 code which of course means the video cannot be downloaded.However with other videos, eg:
https://www.youtube.com/watch?v=kOf54RdoH7A
the video will download.You mentioned this project corresponds somewhat with Pytube for Python: I tested the same (broken) video URL with Pytube on Python and the video URLs both libraries gave were similar but different.
Here is the video URL from YouTubeKit (https://www.youtube.com/watch?v=byrRbWGN1Nk&t=2s):
https://rr4---sn-cu-h5oe7.googlevideo.com/videoplayback?expire=1717471505&ei=sTReZu2JGLXYxN8P9IStmAc&ip=2a00%3A23c6%3A8916%3A4601%3A3ccd%3A97d2%3A584%3Ab609&id=o-AMh2onJ7kBeM1TcBSzEH3AHwi3RxBvc1g5MIfnOf5w_f&itag=313&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=na&mm=31%2C29&mn=sn-cu-h5oe7%2Csn-cu-auod&ms=au%2Crdu&mv=m&mvi=4&pcm2cms=yes&pl=44&initcwndbps=2188750&bui=AbKP-1OvLtwCb4L6dwT1GMEbkK3ZrL7X3gxm7Jk2uN3SPgdGh3yM2NERxfv-OI8gbvJZsqTLa-8SccZ_&spc=UWF9fxsIyYb90o96SI929OsJfiC5ftcu7cmAbYWrLrXY1meJws4thG_mk5sC&vprv=1&svpuc=1&mime=video%2Fwebm&ns=c1SX90TtWbl62x8S5MhcphYQ&rqh=1&gir=yes&clen=41458899&dur=251.920&lmt=1634000891472896&mt=1717449442&fvip=4&keepalive=yes&c=WEB&sefc=1&txp=6216224&n=G66MYAPZ87IsYsFCO&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRgIhAMO0Pdosml7oxsuppKGIpKLSussPwkE7nwdrtEVXBNyFAiEA2EKgHHo4d0MUPosLPhHQZryODpoMejeeHDj1yNr_F9k%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRgIhAPNn3zf-pAHhlEGjbsrVn7fjeWZ0fOVcUepyieRln2iMAiEAuHEKzTdThDUEtTrWVe64qgB6GWv-DFsAZZJcOXn9YWM%3D
and here it is from Pytube:https://rr4---sn-cu-h5oe7.googlevideo.com/videoplayback?expire=1717471554&ei=4jReZrKbB8eKmLAPm-u2qAQ&ip=2a00%3A23c6%3A8916%3A4601%3A3ccd%3A97d2%3A584%3Ab609&id=o-ANagADo5V_Hh4UtyXzzaZEFTX4S4ekFAI4OaX1uxc1L9&itag=22&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=na&mm=31%2C29&mn=sn-cu-h5oe7%2Csn-cu-auod&ms=au%2Crdu&mv=m&mvi=4&pcm2cms=yes&pl=44&initcwndbps=2191250&bui=AbKP-1MGBozmWktaGcxs8nIzz7TRKbdAbxOSv-yL2rwxjGZlrF2wxZLfga6IxX3NSWnT47RiiUXRARtC&vprv=1&mime=video%2Fmp4&rqh=1&cnr=14&ratebypass=yes&dur=251.982&lmt=1634000896163657&mt=1717449687&fvip=4&c=ANDROID_EMBEDDED_PLAYER&txp=6211224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cvprv%2Cmime%2Crqh%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AJfQdSswRQIhAJ1MSgLtyxWxLnQobNiRgFntwlN3p-oJ0RzqPxHknq4zAiBcbtfpxkSFvMYRtmMl2JyFp9KfhpXkOIDZRAm5fy_TCw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRQIgdi5NBPdmU2IOAQCFBTY_2Mr_kZLFu3NUh1aZ9jICM1cCIQCgrRs5TdeaLnJ4wq40U9Ni8nPgOJQ6qONtLzWwdJ67Zw%3D%3D
.Hope this helps.
The text was updated successfully, but these errors were encountered: