pytube / pytube

A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.
https://pytube.io
The Unlicense
12.08k stars 2.5k forks source link

[BUG] Search feature not working at all. #1939

Open congueror opened 3 months ago

congueror commented 3 months ago

When trying to use Search.results in any context, the following error is thrown:

Unexpected renderer encountered.
Renderer name: dict_keys(['adSlotRenderer'])
Search term: random video
Please open an issue at https://github.com/pytube/pytube/issues and provide this log output.
Unexpected renderer encountered.
Renderer name: dict_keys(['reelShelfRenderer'])
Search term: random video
Please open an issue at https://github.com/pytube/pytube/issues and provide this log output.
Unexpected renderer encountered.
Renderer name: dict_keys(['reelShelfRenderer'])
Search term: random video
Please open an issue at https://github.com/pytube/pytube/issues and provide this log output.
[<pytube.__main__.YouTube object: videoId=BHNY4PqqLg8>, <pytube.__main__.YouTube object: videoId=0NcPkQsKZSQ>, <pytube.__main__.YouTube object: videoId=SlT4Qt7FLvQ>, <pytube.__main__.YouTube object: videoId=Qw2LUsS-Ujo>, <pytube.__main__.YouTube object: videoId=M0dwYm_BQ5c>, <pytube.__main__.YouTube object: videoId=lghlkDA1gVY>, <pytube.__main__.YouTube object: videoId=xGmyTaCsv0c>, <pytube.__main__.YouTube object: videoId=c1WaoB5IIvA>, <pytube.__main__.YouTube object: videoId=GsFcOU2xGW0>, <pytube.__main__.YouTube object: videoId=irpBtTdJVps>, <pytube.__main__.YouTube object: videoId=J6MoxGiH5QM>, <pytube.__main__.YouTube object: videoId=LksylzJ6mqw>, <pytube.__main__.YouTube object: videoId=MTTLuuX3BqE>, <pytube.__main__.YouTube object: videoId=WkwnqHNY0mw>, <pytube.__main__.YouTube object: videoId=O9mhFD4Ai-g>, <pytube.__main__.YouTube object: videoId=vC09eyvhx_k>, <pytube.__main__.YouTube object: videoId=EiaC2IJmfFo>, <pytube.__main__.YouTube object: videoId=rQQKXuwACAI>, <pytube.__main__.YouTube object: videoId=-Rn-Zs3X9oQ>]

The very simple code is used:

import pytube
from pytube import YouTube
from pytube import Search

s = Search('random video')
print(s.results)

Just trying to search for videos using the Search feature.

github-actions[bot] commented 3 months ago

Thank you for contributing to PyTube. Please remember to reference Contributing.md