Python module for searching youtube videos to avoid using their heavily rate-limited API.
To avoid using the API, this uses the form on the youtube homepage and scrapes the resulting page.
The release on pypi.org is still on v2.1.2. (Not maintained?)
-
Clone this repo
git clone --depth 1 https://github.com/XniceCraft/youtube_search
-
Install with setup.py
cd youtube_search python3 setup.py install
import asyncio
import youtube_search
# Synchronous version
with youtube_search.YoutubeSearch() as ytsearch:
ytsearch.search("test")
result = ytsearch.list()
#Asynchronous Version
async def search_async():
async with youtube_search.AsyncYoutubeSearch() as ytsearch:
await ytsearch.search("test")
result = ytsearch.list()
asyncio.run(search_async())