add ytsearch script
This commit is contained in:
parent
7db916d08d
commit
640ce045a1
10
local/bin/ytsearch
Executable file
10
local/bin/ytsearch
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from youtube_search import YoutubeSearch # pip install youtube-search
|
||||
from sys import argv
|
||||
|
||||
for result in YoutubeSearch(' '.join(argv[1:])).to_dict():
|
||||
print(result['duration'],
|
||||
f"https://www.youtube.com{result['url_suffix']}",
|
||||
f"{result['title']} -- {result['channel']}",
|
||||
sep='\t')
|
Loading…
Reference in New Issue
Block a user