alexmercerind/youtube-search-python

await out side function

Closed this issue · 1 comments

from youtubesearchpython.future import VideosSearch

videosSearch = VideosSearch('NoCopyrightSounds', limit = 2)
videosResult = await videosSearch.next()
print(videosResult)

Please refer to the asyncExample.py file on the repository.

if __name__ == '__main__':
asyncio.run(main())

Learn more about async Python, otherwise the non __future__ package also works fine I believe.