1from youtube_search import YoutubeSearch
2
3results = YoutubeSearch('search terms', max_results=10).to_json()
4
5print(results)
6
7# returns a json string
8
9########################################
10
11results = YoutubeSearch('search terms', max_results=10).to_dict()
12
13print(results)
14# returns a dictionary
15