Closed BrianLi009 closed 2 years ago
It would certainly be possible by using Channel
class, though we don't provide this feature currently.
You can now retrieve views
within Channel
class. But warning - YouTube doesn't return an integer of views, so you are going to have to parse it by yourself.
Something like this should work fine:
from youtubesearchpython import Channel
c = Channel.get("UC_aEa8K-EOJ3D6gOs7HcyNg")
views = c["views"]
views = views.split(" ")
views = views[0]
views = views.replace(",", "")
views = int(views)
print(views)
As this hasn't been published to PyPI, you are going to have to install from source pip install git+https://github.com/alexmercerind/youtube-search-python
When calling ChannelsSearch, is it possible to obtain the total views of a channel? Thank you!