Metadata-Version: 2.1
Name: youtube_search2
Version: 2.1.5
Summary: A youtube_search fork with additional features and patches.
Author-email: Joe Tatusko <tatuskojc@gmail.com>
Maintainer-email: Patryk Ladocha <patrykladocha76@gmail.com>
License: This is free and unencumbered software released into the public domain.
        
        Anyone is free to copy, modify, publish, use, compile, sell, or
        distribute this software, either in source code form or as a compiled
        binary, for any purpose, commercial or non-commercial, and by any
        means.
        
        In jurisdictions that recognize copyright laws, the author or authors
        of this software dedicate any and all copyright interest in the
        software to the public domain. We make this dedication for the benefit
        of the public at large and to the detriment of our heirs and
        successors. We intend this dedication to be an overt act of
        relinquishment in perpetuity of all present and future rights to this
        software under copyright law.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
        OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
        ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
        OTHER DEALINGS IN THE SOFTWARE.
        
        For more information, please refer to <http://unlicense.org/>
        
Project-URL: Homepage, https://github.com/xNykram/youtube_search2
Project-URL: Issues, https://github.com/xNykram/youtube_search2/issues
Keywords: yt,ytsearch,youtube_search,youtube_search2,youtube-search
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certifi==2024.2.2
Requires-Dist: chardet==5.2.0
Requires-Dist: idna==3.6
Requires-Dist: requests==2.31.0
Requires-Dist: urllib3==2.2.1
Requires-Dist: beautifulsoup4==4.12.3
Requires-Dist: lxml==5.1.0



<div class="center">
  <img src="https://i.ibb.co/f9f3tMM/image.png">
  <p>ytsearch2 is a <a href="https://github.com/joetats/youtube_search">youtube-search</a> fork. The main focus is adding new features and patches.</p>
</div>


![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)

![GitHub Release](https://img.shields.io/github/v/release/xnykram/youtube_search2?&style=flat-square)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/xnykram/youtube_search2/pytest.yml?label=tests&style=flat-square)


## Example usage

### Using URL

``` Python
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

``` Python
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](https://github.com/xNykram/youtube_search2/issues).
