Closed Mrlaminat closed 2 years ago
Would be nice to add a test that it properly parses output with the
pc
in it
Need to check how tests are implemented for your system. Is it has some prepared URL?
Would be nice to add a test that it properly parses output with the
pc
in itNeed to check how tests are implemented for your system. Is it has some prepared URL?
No, it does not do real requests, only tests how it works with the stream output
@norkunas Fixed regex.
PS. I would recommend you add a regex container, from which all regexes could be tested. It will help to cover more supported platforms without huge regex complexity. If you worrying about performance, maybe you can add a function flag ("useMultiplePlatformRegex", by default false).
@Mrlaminat I'm not against it, but currently regexes are simple enough not to introduce your suggested regex container. We'll see in future if it become hard to maintain then it probably will be time for that. Will you be able to write a test for this?
Also I'm curious which source adds the pc
to that sentence? Or is it with the yt-dlp that it adds different source to it?
@Mrlaminat I'm not against it, but currently regexes are simple enough not to introduce your suggested regex container. We'll see in future if it become hard to maintain then it probably will be time for that. Will you be able to write a test for this?
It was just suggestion for the future, right now is good enough!
I just fixed code to pass already existed tests, from my local env I even can't run them with xDebug so it's difficult to find how to create a new one.
LIke for me it works perfect, and it's not broke usuall youtube flow, so looks like we are okay :)
just run with XDEBUG_MODE=off :)
Oh, and why do you need to run with it ? :D
Because there are not tests that covers the part with Downloading pc webpage
so it's better to have at least 1 test to not break this accidentally in future :)
Ok then if you'd like for me to add the test, could you run the lib in debug mode and give me all output it prints?
Why you have closed this?
@norkunas changed my mind. Sorry for the confusion and thank you
Just not to bother you, open and I'll merge as is :bow:
Thank you!
Man, that's a Great project, thank you for developing and maintaining it!
Would be nice to add a test that it properly parses output with the
pc
in it