jeckman / YouTube-Downloader

PHP script for downloading videos from youtube; also parsing youtube feed into RSS enclosures for podcatchers
GNU General Public License v2.0
895 stars 474 forks source link

Signature issue #346

Closed sevakasatryan closed 6 years ago

sevakasatryan commented 6 years ago

Most part of urls returns this message "==== Failed to get signature function ====" ( for example: https://www.youtube.com/watch?v=HQnC1UHBvWA) I think you need to change $signatureFunctionPatterns from SignatureDecipher.php on line 159 or make better solution for getting signature

subabrain commented 6 years ago

same here

DarthDestroyer commented 6 years ago

341

it is sad, that closed issues are not that visible... But that could/should help here

jeckman commented 6 years ago

But #341 was fixed, I thought in #344

Are those of you still having the problem running the latest code base?

subabrain commented 6 years ago

yes i took the latest code base

jswails commented 6 years ago

I am using the latest code and just retested it, and its working fine .

On 11/7/18 1:00 PM, John Eckman wrote:

But #341 https://github.com/jeckman/YouTube-Downloader/issues/341 was fixed, I thought in #344 https://github.com/jeckman/YouTube-Downloader/pull/344

Are those of you still having the problem running the latest code base?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jeckman/YouTube-Downloader/issues/346#issuecomment-436718660, or mute the thread https://github.com/notifications/unsubscribe-auth/AKL_TaDCHvkDl6zO5GMEClgfLYz32XChks5usx_BgaJpZM4YSgbe.

sevakasatryan commented 6 years ago

The code with the last changes worked 5 days before, which was dona by jenyak this user. He added this regexp-s: '/(["\'])signature\1\s,\s([a-zA-Z0-9$]+)(/', '/.sig||([a-zA-Z0-9$]+)(/', '/yt.akamaized.net\/)\s||\s.?\sc\s&&\sd.set([^,]+\s,\s([a-zA-Z0-9$]+)(/', '/\bc\s&&\sd.set([^,]+\s,\s([a-zA-Z0-9$]+)(/',

And this code stopped working since yesterday. I think, but i am not sure (as i don;t know with what logic youtube JS-s work ) that Youtube has done some changes in JS, the quantity of this regexp-s needs to be increased or there needs to be done changes in them.

sevakasatryan commented 6 years ago

I am using the latest code and just retested it, and its working fine . On 11/7/18 1:00 PM, John Eckman wrote: But #341 <#341> was fixed, I thought in #344 <#344> Are those of you still having the problem running the latest code base? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#346 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AKL_TaDCHvkDl6zO5GMEClgfLYz32XChks5usx_BgaJpZM4YSgbe.

You can try on those links, https://www.youtube.com/watch?v=11S5tcT2Tm0 https://www.youtube.com/watch?v=JGCsyshUU-A https://www.youtube.com/watch?v=dyxEPZq9ONA&t=201s https://www.youtube.com/watch?v=frtuXA9HUWM https://www.youtube.com/watch?v=DHdkRvEzW84

And there are lots of links, for which it is not working. (I have taken the code which was last updated)

BudComSol commented 6 years ago

Latest code base and similar issue.

jswails commented 6 years ago

What link. I would like to try it. Thanks

On Thu, Nov 8, 2018, 7:32 AM SnappaGuy <notifications@github.com wrote:

Latest code base and similar issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeckman/YouTube-Downloader/issues/346#issuecomment-436978772, or mute the thread https://github.com/notifications/unsubscribe-auth/AKL_TdBhNg_wd8GCV75npM1WGis2cX64ks5utCRUgaJpZM4YSgbe .

BudComSol commented 6 years ago

Try these, all worked previously, now do not:

https://www.youtube.com/watch?v=BqV9NZSGIa4&list=RDBqV9NZSGIa4&start_radio=1 https://www.youtube.com/watch?v=vSU2EkTR6vI&t=2296s https://www.youtube.com/watch?v=vSU2EkTR6vI&t=249s https://www.youtube.com/watch?v=EMRJT2ebvAk https://www.youtube.com/watch?v=cJwJ11-pmxg

jswails commented 6 years ago

I can confirm those links do break the lastest build as well with this new error message

==== Failed to get signature function ====

On 11/8/18 7:09 PM, SnappaGuy wrote:

Try these, all worked previously, now do not:

https://www.youtube.com/watch?v=BqV9NZSGIa4&list=RDBqV9NZSGIa4&start_radio=1 https://www.youtube.com/watch?v=vSU2EkTR6vI&t=2296s https://www.youtube.com/watch?v=vSU2EkTR6vI&t=249s https://www.youtube.com/watch?v=EMRJT2ebvAk https://www.youtube.com/watch?v=cJwJ11-pmxg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeckman/YouTube-Downloader/issues/346#issuecomment-437202802, or mute the thread https://github.com/notifications/unsubscribe-auth/AKL_TdQh1_EuVYDP-ZriULataZeR4Fgdks5utMeygaJpZM4YSgbe.

StefansArya commented 6 years ago

Parsing minified js script with regex will not always work and would be difficult to see the logic behind of it.

And yet because there are so many people need it (I also got message on stackoverflow). So I decided to reupload my old library that includes the decipher logic.

https://github.com/ScarletsFiction/LittleYoutube-PHP/blob/81879f2869185ef5589b837c2206ba40a15f4017/src/LittleYoutube.php#L508-L658

You can try it here

jswails commented 6 years ago

i just tested the links posted as broken in this thread and they work now with the latest code repo. thanks for the code fix. I confirmed this one worked https://www.youtube.com/watch?v=dyxEPZq9ONA&t=201s

subabrain commented 6 years ago

thx to you!

BudComSol commented 6 years ago

Thank you StefansArya.

sevakasatryan commented 6 years ago

Thanks StefansArya your library is working correctly.

StefansArya commented 6 years ago

Your welcome guys.

jeckman commented 6 years ago

I believe this is now closed