Skip to main content

a youtube_search fork with additional features and patches.

Project description

ytsearch2 is a youtube-search fork. The main focus is adding new features and patches.

Python

GitHub Release GitHub Actions Workflow Status

Example usage

Using URL

from youtube_search2 import YoutubeSearch

search_engine = YTSearch()
video_info = search_engine.search_by_url("https://www.youtube.com/watch?v=jNQXAC9IVRw")

output: {'id': 'jNQXAC9IVRw', 'title': 'Me at the zoo', 'thumbnail': 'https://i.ytimg.com/vi/jNQXAC9IVRw/maxresdefault.jpg', 'duration': '19063'}

Using keyword

from youtube_search2 import YoutubeSearch

search_engine = YTSearch()
video_info = search_engine.search_by_term("Me at the zoo", max_results=1)

output: [{'id': 'jNQXAC9IVRw', 'thumbnails': ['https://i.ytimg.com/vi/jNQXAC9IVRw/hqdefault.jpg?sqp=-oaymwE9COADEI4CSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Ab4CgALwAYoCDAgAEAEYVCBYKGUwDw==&rs=AOn4CLC4lp5lwDTP5b30m6scq6a7lKyA8Q'], 'title': 'Me at the zoo', 'long_desc': None, 'channel': 'jawed', 'duration': '0:19', 'views': '310\xa0243\xa0516 views', 'publish_time': '18 years ago', 'url_suffix': '/watch?v=jNQXAC9IVRw&pp=ygUNTWUgYXQgdGhlIHpvbw%3D%3D'}]

Plans

  • scrap more data like sub count for method search_by_url.

Please report any suggestions and issues here.

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

youtube_search2-2.1.7.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

youtube_search2-2.1.7-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file youtube_search2-2.1.7.tar.gz.

File metadata

  • Download URL: youtube_search2-2.1.7.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for youtube_search2-2.1.7.tar.gz
Algorithm Hash digest
SHA256 4e930e4a47445afb72f155e126792f7f805061c7069300ad6fd98f21ee85b22d
MD5 26df18bb8489bbc7a04d9bd55c2fd0c9
BLAKE2b-256 32a7c40191a8e05903f8862da8075a6825d232b0369c3a512a09c3a6c0e5be8a

See more details on using hashes here.

File details

Details for the file youtube_search2-2.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for youtube_search2-2.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 df7986d5aa722e8e8fa99740330d5c4fb4a759a65820a80ccb9cb88ceca44538
MD5 d7326158d44546eb60461c5ed5bdee7e
BLAKE2b-256 4df8a79a0d63d049d2e2ec3b77c14378b5dbef0fbc49c52e7f58ab9925d3b3c4

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