Skip to main content

🔎 Search for videos, channels and playlists on YouTube quickly and easily.

Project description

Tube Search - Youtube fast and practical search engine in Python

Tube Search

Tube Search is an asynchronous, constantly up-to-date and written python library, aiming to do research simply, practically and quickly on YouTube.

Search for Video (1 Video):

from asyncio import run
from tube_search import VideoSearch

async def main() -> None:
    video = await VideoSearch().video(
        query="Elektronomia",
        language="en-US",
        region="US"
    )
    print(video)
    print()
    print(video.videoTitle)

run(main())

Output from search video (1 video):

$ TubeVideoInfo(videoID='TW9d8vYrVFQ', videoTitle='Elektronomia - Sky High | Progressive House | NCS - Copyright Free Music', videoDuration='3:58', publishedTime='8 years ago', videoViewCount=TubeViewsInfo(view_count='264,461,922 views', view_abbr_count='264M views'), thumbnails=[TubeThumbnailsInfo(url='https://i.ytimg.com/vi/TW9d8vYrVFQ/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDzHv6boRaBnEoZWSNFdZRGVdUmJw', width=480, height=270)], descriptionSnippet='#nocopyrightsounds #copyrightfree #music #song #edm #dancemusic #royaltyfreemusic #copyrightfreemusic #nocopyrightmusic\xa0...', channel=TubeChannelInfo(title='NoCopyrightSounds', id='UC_aEa8K-EOJ3D6gOs7HcyNg', thumbnails=[TubeThumbnailsInfo(url='https://yt3.ggpht.com/opGwWu2ScRBy-OA81LIzKwSatxlVKjjNyAdt4fWh4LoLzldx05Sdf3OGQz0Fz78ziZ9RLP4=s68-c-k-c0x00ffffff-no-rj', width=68, height=68)], url='https://www.youtube.com/channel/UC_aEa8K-EOJ3D6gOs7HcyNg'), accessibility=TubeAccessibilityInfo(title='Elektronomia - Sky High | Progressive House | NCS - Copyright Free Music 3 minutes, 58 seconds', duration='3 minutes, 58 seconds'), url='https://www.youtube.com/watch?v=TW9d8vYrVFQ', shelfTitle=None)

$ Elektronomia - Sky High | Progressive House | NCS - Copyright Free Music

Search for Videos (2 or more videos):

from asyncio import run
from tube_search import VideoSearch

async def main() -> None:
    video = await VideoSearch().videos(
        query="Elektronomia",
        language="en-US",
        region="US",
        limit=3
    )
    print(len(video))
    print(video)

run(main())

Output fron search videos (2 or more vídeos):

$ 2
$ [TubeVideoInfo(videoID='TW9d8vYrVFQ', videoTitle='Elektronomia - Sky High | Progressive House | NCS - Copyright Free Music', videoDuration='3:58', publishedTime='8 years ago', videoViewCount=TubeViewsInfo(view_count='264,729,531 views', view_abbr_count='264M views'), thumbnails=[TubeThumbnailsInfo(url='https://i.ytimg.com/vi/TW9d8vYrVFQ/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDzHv6boRaBnEoZWSNFdZRGVdUmJw', width=480, height=270)], descriptionSnippet='#nocopyrightsounds #copyrightfree #music #song #edm #dancemusic #royaltyfreemusic #copyrightfreemusic #nocopyrightmusic\xa0...', channel=TubeChannelInfo(title='NoCopyrightSounds', id='UC_aEa8K-EOJ3D6gOs7HcyNg', thumbnails=[TubeThumbnailsInfo(url='https://yt3.ggpht.com/opGwWu2ScRBy-OA81LIzKwSatxlVKjjNyAdt4fWh4LoLzldx05Sdf3OGQz0Fz78ziZ9RLP4=s68-c-k-c0x00ffffff-no-rj', width=68, height=68)], url='https://www.youtube.com/channel/UC_aEa8K-EOJ3D6gOs7HcyNg'), accessibility=TubeAccessibilityInfo(title='Elektronomia - Sky High | Progressive House | NCS - Copyright Free Music 3 minutes, 58 seconds', duration='3 minutes, 58 seconds'), url='https://www.youtube.com/watch?v=TW9d8vYrVFQ', shelfTitle=None), TubeVideoInfo(videoID='IvVgQHZtpQE', videoTitle='Best of Elektronomia 2018 | Top 20 Songs of Elektronomia', videoDuration='1:19:17', publishedTime='6 years ago', videoViewCount=TubeViewsInfo(view_count='3,551,520 views', view_abbr_count='3.5M views'), thumbnails=[TubeThumbnailsInfo(url='https://i.ytimg.com/vi/IvVgQHZtpQE/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDMuVnG1n3vFCydcS25IoGFeATqiA', width=360, height=202), TubeThumbnailsInfo(url='https://i.ytimg.com/vi/IvVgQHZtpQE/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLA3EB6Wp6JT-cDSieyTiTqWcFTCVA', width=720, height=404)], descriptionSnippet='Elektronomia Top 20 | Best of Elektronomia 2018 Please help Musicbot reach 100k subscriber by join at\xa0...', channel=TubeChannelInfo(title='Musicbot', id='UCDsbBjIl0lYZB4IokDLyWIQ', thumbnails=[TubeThumbnailsInfo(url='https://yt3.ggpht.com/ytc/AIdro_nqKHLecROII_Q_UJTkPI6W7C-6hlXCPzpVwDwBU7E4x2o=s68-c-k-c0x00ffffff-no-rj', width=68, height=68)], url='https://www.youtube.com/channel/UCDsbBjIl0lYZB4IokDLyWIQ'), accessibility=TubeAccessibilityInfo(title='Best of Elektronomia 2018 | Top 20 Songs of Elektronomia 1 hour, 19 minutes', duration='1 hour, 19 minutes, 17 seconds'), url='https://www.youtube.com/watch?v=IvVgQHZtpQE', shelfTitle=None)]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tube_search-0.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tube_search-0.0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file tube_search-0.0.2.tar.gz.

File metadata

  • Download URL: tube_search-0.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for tube_search-0.0.2.tar.gz
Algorithm Hash digest
SHA256 bfd4cb10c88fcb453059e51d2fc4c0269b692010e319c366cc674886bc4eb6c3
MD5 22b5d08080f66ceac1340de0192d1bd3
BLAKE2b-256 b54cff84bdb4787e5795dd110dc66b207f4243cb75b9b69c5c7c052a8b73ce4e

See more details on using hashes here.

File details

Details for the file tube_search-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: tube_search-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for tube_search-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a95383ed45e38fe13ca925b5ca494ee8e7b1a44cc64a9a7ef05d9c7eaf490978
MD5 af76f13faa93d78c1537e19e0c179bd5
BLAKE2b-256 0cd3cd82b1ba8caf7ec24b72195b37cc34500bae5cd6a6f33e9a5350c00af9c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page