Closed tekinc closed 3 weeks ago
What do you mean by importing millions of videos?
Related to #317.
Import millions of video records.
Without further details as requested (records not helping), I close this issue.
See https://yt.lemnoslife.com for alternatives.
Hi, how can I search and order by date using YouTube v1 API?
You mean YouTube Data API v3 or YouTube operational API? See YouTube-operational-API/wiki/Glossary/a6950ce5b5b5809b41129a0d1ded16b039a64358 if unsure.
What are you searching? Videos, shorts or/and channels? By a string query like MrBeast Squid Game?
I am using YouTube operational API and am searching for videos.
Let me know if Webscrap_any_website/src/commit/12586241ddbb0651f639565cd0bf65085fa42d16/https:/www.youtube.com/results/main.py#{L112,L14-L18} does not meet your needs.
Thanks but I am using your PHP implementation. Do you have the fix for that?
I do not plan to add PHP support for this feature, let me know if I should add an HTTP interface, see Webscrap_any_website/src/commit/12586241ddbb0651f639565cd0bf65085fa42d16/README.md#install-your-own-http-interface-instance, that you would have to host for this feature.
It would be great if you could add it to HTTP interface. I am already hosting your YouTube operational API.
Note that the solution I proposed you, see #issuecomment-2445499106, is independent from YouTube operational API.
I just updated the HTTP interface as you requested, such that:
curl -X GET 'http://localhost:8080/https:/www.youtube.com/results?search_query=Minecraft' -d 'type=video' -d 'sort by=upload date'
should meet your needs.
Great, thanks
Hi, sorry is it possible for you to add this to the YouTube operational API? I have already the entire flow in place and would to keep it.
Sorry but I won't implement this feature to the YouTube operational API, see #327#issuecomment-2450624202 for details about why.
Understood, is it possible to guide me where I can make that change? All I need is to set the order param correctly.
If you mean helping me to tell you what to change in YouTube operational API, then forget it. I have not yet done such complex thing and I do not recommend anyone to do so. Generating Protobuf in PHP is a hell while in Python it is very easy.
Didn't realize is was that complicated in YouTube operational API. You already have a viewCount order parameter, I thought it would be easy to add "age" or "date". I guess not?
The code you selected is a hardcoded Protobuf string, for your very precise use case (search?q=QUERY&type=video&order=uploadDate
) another one might fit your needs. However, it acts as an unoptimized blackbox which is very easily no more interesting, for instance such a hardcoded approach would not work for search?q=QUERY&type=channel&order=uploadDate
, as type=channel
and order=uploadDate
would need to merge 2 hardcoded blackbox Protobufs with such an approach, so you would have to hardcode the merge result and so on. Hence, the number of hardcoded Protobuf string would be exponential... So it is not an approach that I recommend, as it results in Protobuf hell syntax as we can see at the bottom of your screen. The purpose of my work is to meet all needs, not just your precise use case at the expense of the needs of others, that's why I focus for this kind of complex feature on Webscrap any website as it is far better implemented and such better implementation is not easily possible in PHP as far as I know.
Please do not ask me further assistance on what I consider as a bad approach.
Thanks for the response. Last question, I am only using the YouTube operational API for type=video
searches. How could I generate a Protobuf string to replace that hardcoded one to support these parameters q=QUERY&type=video&order=uploadDate
?
Hi, great job with this API. I was in the middle of importing millions of videos but it didn't complete now that you have suspended your service.
What would you recommend the best way to accomplish this?