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.
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.6.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for youtube_search2-2.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46ce4d703da791f7e47a586ccc0817a8effdfe97e42ce5247b6a001de789119e |
|
MD5 | 7cda00d9c032923b1184cbb0e762b621 |
|
BLAKE2b-256 | 1d70d7b3d472547b91cfa38ae3095977022a1a513abffc88fd28580e349abd63 |