Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Conversation

@mytja
Copy link
Collaborator

@mytja mytja commented Nov 27, 2021

@mytja
Copy link
Collaborator Author

mytja commented Nov 27, 2021

@Zocker1999NET May you test it? Tests are passing. Is that what you wanted?

@Zocker1999NET
Copy link
Contributor

Thanks for your work, with this patch and using enableHTML=True my tests pass too.

It still makes the whole extraction process slower and it uses up more unnecessary resources (for my case) on the network and YouTube, so I am still considering to stay at a version without the fixes of #134 because this issue does not really affect me.

It may be could be considered for a future version that there are some users, which need the upload date, and some, which prefer to receive working direct stream URLs. Then for example, a call to this library could look like Video.getInfo(video_url, get_release_date=True, get_stream_urls=False) (for my case) and the library could decide on requiring only one plain HTML request to do. But this is only an idea.

Still, this is better than before, so thank you. Please merge this change, maybe I will code something like that idea later on.

… Video.get() with ability to use both of them
@mytja
Copy link
Collaborator Author

mytja commented Nov 28, 2021

Okay, so here it is.

Now it's like this:

  • Video.getFormats() uses InnerTube API, and you cannot change that
  • Video.getInfo() uses HTML, and you cannot change that
  • Video.get() uses InnerTube API by default, but you can also create a HTML request to YouTube ALONGSIDE InnerTube API using get_upload_date=True

I will merge it, as tests are passing, and it seems to work just fine.

@mytja mytja merged commit 5cfb82d into main Nov 28, 2021
@Zocker1999NET
Copy link
Contributor

@mytja that makes even more sense for a good backwards compatibility, thanks for your work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants