-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff8f9d3
commit a3b9fa5
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"kind": "youtube#videoListResponse", "etag": "1brJlydEppKCtlLkTECqfc0R2FQ", "items": [{"kind": "youtube#video", "etag": "uLILM11NV8JK9byHrbiKzGV_Hk8", "id": "cf956pNUnFw", "snippet": {"publishedAt": "2020-10-25T12:15:03Z", "channelId": "UC76T2-lOThakES8Z_Lw3K7Q", "title": "Dashavatar | Narci | Bhuvan Sharma (Prod. By Ezik)", "description": "Song: Dashavatar\nRap Artist: Narci \nSinger: Bhuvan Sharma\nLyrics: Narci (Excluding Shree Hari Stotram)\nConcept: Narci\nArrangement: Narci\nMusic: Ezik\nMixing & Mastering: Ezik\nPoster: I Kill Graphix \nVideo Concept & Direction: Aasheesh Kashyap\nEditor & Colourist: Aasheesh Kashyap\nAssistant Director: Sachin Kotal\nKathak Dancer: Nitin Kumar\nChoreographer: Nitin Kumar\nProduction: Suryavanshi Rangmanch Theatre Group & Nand Sweets, Sector 7-C, Chandigarh. \n\nLYRICS- https://genius.com/Narci-dashavatar-lyrics\n\nSTREAM/PURCHASE FULL SONG ON\nSpotify: https://open.spotify.com/track/7cEbOdPHth4Ca2Qejq55if?si=0CtxK4JGQaKdCbzXAX1qZg\nApple Music- https://music.apple.com/in/album/dashavatar-single/1537123685\nJioSaavn: https://www.jiosaavn.com/song/dashavatar/JzdcXQ5VY1o\nWynk: https://wynk.in/music/song/dashavatar/bl_A10320WT036360915H\nHungama: https://www.hungama.com/album/dashavatar/59337116/\n\n\nSPECIAL THANKS\n\u2022 Singh DJ brothers, sector 8-C, Chandigarh.\n\u2022 Yogesh Lukas aka Vampire (dancer, rapper & lyricist) from Kalamdhaari Crew.\n\nABOUT SONG\nWe are all familiar with the 10 incarnations of Lord Vishnu (known as Dashavatar). When there has been loss of unrighteousness, then Lord Vishnu has saved this earth from the unrighteous by taking an avatar in every age. Through this song, I have described every incarnation of Lord Vishnu in a concise manner. This is a small and beautiful effort to show the ten avatars which will hopefully touch your hearts.\n\nDASHAVATAR\nThe Dashavatar refers to the ten primary incarnations (avatars) of Vishnu, the Hindu God of preservation which has Rigvedic origins. Vishnu is said to descend in the form of an avatar to restore cosmic order. The word Dashavatara derives from da\u015ba, meaning 'ten', and avatar (avat\u0101ra), roughly equivalent to 'incarnation'. The most popular ten avatars based on many puranas are Matsya, Kurma, Varaha, Narasimha, Vamana, Parashurama, Rama, Krishna, Buddha, and Kalki.\n\nINSTAGRAM\nNarci: narci_thoughts\nEzik: being_ezik\nBhuvan Sharma: sharma_bhuvan\nAasheesh Kashyap: aasheesh.k\nSachin Kotal: sachin_kotal\nNitin Kumar: kathakarnitin\nYogesh aka Vampire: yogesh_the.bowcrew\nAaryan Kashyap: aaryankashyapp\nRohit Singh: rohit_7621\nSuryavanshi Rangmanch: suryavanshi_rangmanch\n\n#Dashavatar #Narci #BhuvanSharma #Ezik", "thumbnails": {"default": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/default.jpg", "width": 120, "height": 90}, "medium": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/mqdefault.jpg", "width": 320, "height": 180}, "high": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/hqdefault.jpg", "width": 480, "height": 360}, "standard": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/sddefault.jpg", "width": 640, "height": 480}, "maxres": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/maxresdefault.jpg", "width": 1280, "height": 720}}, "channelTitle": "NARCI", "tags": ["Narci", "dashavatar", "dashavatar Narci", "Narci Dashavatar", "Narci Dasavatar song", "dashavatar Narci song", "Narci Dashavatar songs", "Narci Dashavatar Hinduism", "Narci Dashavatar Hindu", "Narci Dashavatar Vishnu Purana", "narci dasavatharam"], "categoryId": "10", "liveBroadcastContent": "none", "localized": {"title": "Dashavatar | Narci | Bhuvan Sharma (Prod. By Ezik)", "description": "Song: Dashavatar\nRap Artist: Narci \nSinger: Bhuvan Sharma\nLyrics: Narci (Excluding Shree Hari Stotram)\nConcept: Narci\nArrangement: Narci\nMusic: Ezik\nMixing & Mastering: Ezik\nPoster: I Kill Graphix \nVideo Concept & Direction: Aasheesh Kashyap\nEditor & Colourist: Aasheesh Kashyap\nAssistant Director: Sachin Kotal\nKathak Dancer: Nitin Kumar\nChoreographer: Nitin Kumar\nProduction: Suryavanshi Rangmanch Theatre Group & Nand Sweets, Sector 7-C, Chandigarh. \n\nLYRICS- https://genius.com/Narci-dashavatar-lyrics\n\nSTREAM/PURCHASE FULL SONG ON\nSpotify: https://open.spotify.com/track/7cEbOdPHth4Ca2Qejq55if?si=0CtxK4JGQaKdCbzXAX1qZg\nApple Music- https://music.apple.com/in/album/dashavatar-single/1537123685\nJioSaavn: https://www.jiosaavn.com/song/dashavatar/JzdcXQ5VY1o\nWynk: https://wynk.in/music/song/dashavatar/bl_A10320WT036360915H\nHungama: https://www.hungama.com/album/dashavatar/59337116/\n\n\nSPECIAL THANKS\n\u2022 Singh DJ brothers, sector 8-C, Chandigarh.\n\u2022 Yogesh Lukas aka Vampire (dancer, rapper & lyricist) from Kalamdhaari Crew.\n\nABOUT SONG\nWe are all familiar with the 10 incarnations of Lord Vishnu (known as Dashavatar). When there has been loss of unrighteousness, then Lord Vishnu has saved this earth from the unrighteous by taking an avatar in every age. Through this song, I have described every incarnation of Lord Vishnu in a concise manner. This is a small and beautiful effort to show the ten avatars which will hopefully touch your hearts.\n\nDASHAVATAR\nThe Dashavatar refers to the ten primary incarnations (avatars) of Vishnu, the Hindu God of preservation which has Rigvedic origins. Vishnu is said to descend in the form of an avatar to restore cosmic order. The word Dashavatara derives from da\u015ba, meaning 'ten', and avatar (avat\u0101ra), roughly equivalent to 'incarnation'. The most popular ten avatars based on many puranas are Matsya, Kurma, Varaha, Narasimha, Vamana, Parashurama, Rama, Krishna, Buddha, and Kalki.\n\nINSTAGRAM\nNarci: narci_thoughts\nEzik: being_ezik\nBhuvan Sharma: sharma_bhuvan\nAasheesh Kashyap: aasheesh.k\nSachin Kotal: sachin_kotal\nNitin Kumar: kathakarnitin\nYogesh aka Vampire: yogesh_the.bowcrew\nAaryan Kashyap: aaryankashyapp\nRohit Singh: rohit_7621\nSuryavanshi Rangmanch: suryavanshi_rangmanch\n\n#Dashavatar #Narci #BhuvanSharma #Ezik"}, "defaultAudioLanguage": "en"}, "contentDetails": {"duration": "PT8M21S", "dimension": "2d", "definition": "hd", "caption": "false", "licensedContent": true, "contentRating": {}, "projection": "rectangular"}, "status": {"uploadStatus": "processed", "privacyStatus": "public", "license": "youtube", "embeddable": true, "publicStatsViewable": true, "madeForKids": false}, "statistics": {"viewCount": "614793", "likeCount": "20058", "favoriteCount": "0", "commentCount": "1119"}, "player": {"embedHtml": "<iframe width=\"480\" height=\"270\" src=\"//www.youtube.com/embed/cf956pNUnFw\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>"}, "topicDetails": {"topicCategories": ["https://en.wikipedia.org/wiki/Hip_hop_music", "https://en.wikipedia.org/wiki/Music", "https://en.wikipedia.org/wiki/Music_of_Asia"]}, "recordingDetails": {}}], "pageInfo": {"totalResults": 1, "resultsPerPage": 1}} |
36 changes: 36 additions & 0 deletions
36
superagi/tools/youtubeToolkit/test/test_video_details_tool.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import unittest | ||
from json import load,dump | ||
import sys | ||
from os import getcwd | ||
|
||
module_path = getcwd().replace("tests","") | ||
sys.path.append(module_path) | ||
from get_video_details_tool import GetVideoDetailsTool,GetVideoDetailsInput | ||
|
||
|
||
class GetVideoDetailsToolTestCase(unittest.TestCase): | ||
def setUp(self): | ||
self.tool = GetVideoDetailsTool() | ||
|
||
def test_tool_name(self): | ||
self.assertEqual(self.tool.name, "Get Video Details") | ||
|
||
def test_tool_args_schema(self): | ||
self.assertEqual(self.tool.args_schema, GetVideoDetailsInput) | ||
|
||
def test_tool_description(self): | ||
self.assertEqual(self.tool.description, "Retrieves video details from youtube API") | ||
|
||
def test_execute_method(self): | ||
video_input = GetVideoDetailsInput(video_id="cf956pNUnFw") | ||
json_file= open("video_data.json","r") | ||
expected_output = load(json_file) | ||
json_file.close() | ||
output = self.tool._execute(video_id=video_input.video_id) | ||
with open("test_data.json","w") as json_file: | ||
dump(output,json_file) | ||
self.assertEqual(output,expected_output) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
|
26 changes: 26 additions & 0 deletions
26
superagi/tools/youtubeToolkit/test/test_youtube_toolkit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import unittest | ||
from os import getcwd | ||
import sys | ||
module_path = getcwd().replace("tests","") | ||
sys.path.append(module_path) | ||
|
||
from get_video_details_tool import GetVideoDetailsTool | ||
from youtube_toolkit import YoutubeToolkit | ||
|
||
|
||
class YoutubeToolkitTests(unittest.TestCase): | ||
def setUp(self): | ||
self.toolkit = YoutubeToolkit() | ||
|
||
def test_get_tools_returns_list_of_tools(self): | ||
tools = self.toolkit.get_tools() | ||
self.assertIsInstance(tools, list) | ||
self.assertTrue(all(isinstance(tool, GetVideoDetailsTool) for tool in tools)) | ||
|
||
def test_toolkit_has_name_and_description(self): | ||
self.assertEqual(self.toolkit.name, "Youtube Toolkit") | ||
self.assertEqual(self.toolkit.description, "Youtube Toolkit contains tools for youtube channel and youtube videos") | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"kind": "youtube#videoListResponse", "etag": "1brJlydEppKCtlLkTECqfc0R2FQ", "items": [{"kind": "youtube#video", "etag": "uLILM11NV8JK9byHrbiKzGV_Hk8", "id": "cf956pNUnFw", "snippet": {"publishedAt": "2020-10-25T12:15:03Z", "channelId": "UC76T2-lOThakES8Z_Lw3K7Q", "title": "Dashavatar | Narci | Bhuvan Sharma (Prod. By Ezik)", "description": "Song: Dashavatar\nRap Artist: Narci \nSinger: Bhuvan Sharma\nLyrics: Narci (Excluding Shree Hari Stotram)\nConcept: Narci\nArrangement: Narci\nMusic: Ezik\nMixing & Mastering: Ezik\nPoster: I Kill Graphix \nVideo Concept & Direction: Aasheesh Kashyap\nEditor & Colourist: Aasheesh Kashyap\nAssistant Director: Sachin Kotal\nKathak Dancer: Nitin Kumar\nChoreographer: Nitin Kumar\nProduction: Suryavanshi Rangmanch Theatre Group & Nand Sweets, Sector 7-C, Chandigarh. \n\nLYRICS- https://genius.com/Narci-dashavatar-lyrics\n\nSTREAM/PURCHASE FULL SONG ON\nSpotify: https://open.spotify.com/track/7cEbOdPHth4Ca2Qejq55if?si=0CtxK4JGQaKdCbzXAX1qZg\nApple Music- https://music.apple.com/in/album/dashavatar-single/1537123685\nJioSaavn: https://www.jiosaavn.com/song/dashavatar/JzdcXQ5VY1o\nWynk: https://wynk.in/music/song/dashavatar/bl_A10320WT036360915H\nHungama: https://www.hungama.com/album/dashavatar/59337116/\n\n\nSPECIAL THANKS\n\u2022 Singh DJ brothers, sector 8-C, Chandigarh.\n\u2022 Yogesh Lukas aka Vampire (dancer, rapper & lyricist) from Kalamdhaari Crew.\n\nABOUT SONG\nWe are all familiar with the 10 incarnations of Lord Vishnu (known as Dashavatar). When there has been loss of unrighteousness, then Lord Vishnu has saved this earth from the unrighteous by taking an avatar in every age. Through this song, I have described every incarnation of Lord Vishnu in a concise manner. This is a small and beautiful effort to show the ten avatars which will hopefully touch your hearts.\n\nDASHAVATAR\nThe Dashavatar refers to the ten primary incarnations (avatars) of Vishnu, the Hindu God of preservation which has Rigvedic origins. Vishnu is said to descend in the form of an avatar to restore cosmic order. The word Dashavatara derives from da\u015ba, meaning 'ten', and avatar (avat\u0101ra), roughly equivalent to 'incarnation'. The most popular ten avatars based on many puranas are Matsya, Kurma, Varaha, Narasimha, Vamana, Parashurama, Rama, Krishna, Buddha, and Kalki.\n\nINSTAGRAM\nNarci: narci_thoughts\nEzik: being_ezik\nBhuvan Sharma: sharma_bhuvan\nAasheesh Kashyap: aasheesh.k\nSachin Kotal: sachin_kotal\nNitin Kumar: kathakarnitin\nYogesh aka Vampire: yogesh_the.bowcrew\nAaryan Kashyap: aaryankashyapp\nRohit Singh: rohit_7621\nSuryavanshi Rangmanch: suryavanshi_rangmanch\n\n#Dashavatar #Narci #BhuvanSharma #Ezik", "thumbnails": {"default": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/default.jpg", "width": 120, "height": 90}, "medium": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/mqdefault.jpg", "width": 320, "height": 180}, "high": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/hqdefault.jpg", "width": 480, "height": 360}, "standard": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/sddefault.jpg", "width": 640, "height": 480}, "maxres": {"url": "https://i.ytimg.com/vi/cf956pNUnFw/maxresdefault.jpg", "width": 1280, "height": 720}}, "channelTitle": "NARCI", "tags": ["Narci", "dashavatar", "dashavatar Narci", "Narci Dashavatar", "Narci Dasavatar song", "dashavatar Narci song", "Narci Dashavatar songs", "Narci Dashavatar Hinduism", "Narci Dashavatar Hindu", "Narci Dashavatar Vishnu Purana", "narci dasavatharam"], "categoryId": "10", "liveBroadcastContent": "none", "localized": {"title": "Dashavatar | Narci | Bhuvan Sharma (Prod. By Ezik)", "description": "Song: Dashavatar\nRap Artist: Narci \nSinger: Bhuvan Sharma\nLyrics: Narci (Excluding Shree Hari Stotram)\nConcept: Narci\nArrangement: Narci\nMusic: Ezik\nMixing & Mastering: Ezik\nPoster: I Kill Graphix \nVideo Concept & Direction: Aasheesh Kashyap\nEditor & Colourist: Aasheesh Kashyap\nAssistant Director: Sachin Kotal\nKathak Dancer: Nitin Kumar\nChoreographer: Nitin Kumar\nProduction: Suryavanshi Rangmanch Theatre Group & Nand Sweets, Sector 7-C, Chandigarh. \n\nLYRICS- https://genius.com/Narci-dashavatar-lyrics\n\nSTREAM/PURCHASE FULL SONG ON\nSpotify: https://open.spotify.com/track/7cEbOdPHth4Ca2Qejq55if?si=0CtxK4JGQaKdCbzXAX1qZg\nApple Music- https://music.apple.com/in/album/dashavatar-single/1537123685\nJioSaavn: https://www.jiosaavn.com/song/dashavatar/JzdcXQ5VY1o\nWynk: https://wynk.in/music/song/dashavatar/bl_A10320WT036360915H\nHungama: https://www.hungama.com/album/dashavatar/59337116/\n\n\nSPECIAL THANKS\n\u2022 Singh DJ brothers, sector 8-C, Chandigarh.\n\u2022 Yogesh Lukas aka Vampire (dancer, rapper & lyricist) from Kalamdhaari Crew.\n\nABOUT SONG\nWe are all familiar with the 10 incarnations of Lord Vishnu (known as Dashavatar). When there has been loss of unrighteousness, then Lord Vishnu has saved this earth from the unrighteous by taking an avatar in every age. Through this song, I have described every incarnation of Lord Vishnu in a concise manner. This is a small and beautiful effort to show the ten avatars which will hopefully touch your hearts.\n\nDASHAVATAR\nThe Dashavatar refers to the ten primary incarnations (avatars) of Vishnu, the Hindu God of preservation which has Rigvedic origins. Vishnu is said to descend in the form of an avatar to restore cosmic order. The word Dashavatara derives from da\u015ba, meaning 'ten', and avatar (avat\u0101ra), roughly equivalent to 'incarnation'. The most popular ten avatars based on many puranas are Matsya, Kurma, Varaha, Narasimha, Vamana, Parashurama, Rama, Krishna, Buddha, and Kalki.\n\nINSTAGRAM\nNarci: narci_thoughts\nEzik: being_ezik\nBhuvan Sharma: sharma_bhuvan\nAasheesh Kashyap: aasheesh.k\nSachin Kotal: sachin_kotal\nNitin Kumar: kathakarnitin\nYogesh aka Vampire: yogesh_the.bowcrew\nAaryan Kashyap: aaryankashyapp\nRohit Singh: rohit_7621\nSuryavanshi Rangmanch: suryavanshi_rangmanch\n\n#Dashavatar #Narci #BhuvanSharma #Ezik"}, "defaultAudioLanguage": "en"}, "contentDetails": {"duration": "PT8M21S", "dimension": "2d", "definition": "hd", "caption": "false", "licensedContent": true, "contentRating": {}, "projection": "rectangular"}, "status": {"uploadStatus": "processed", "privacyStatus": "public", "license": "youtube", "embeddable": true, "publicStatsViewable": true, "madeForKids": false}, "statistics": {"viewCount": "614793", "likeCount": "20058", "favoriteCount": "0", "commentCount": "1119"}, "player": {"embedHtml": "<iframe width=\"480\" height=\"270\" src=\"//www.youtube.com/embed/cf956pNUnFw\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>"}, "topicDetails": {"topicCategories": ["https://en.wikipedia.org/wiki/Hip_hop_music", "https://en.wikipedia.org/wiki/Music", "https://en.wikipedia.org/wiki/Music_of_Asia"]}, "recordingDetails": {}}], "pageInfo": {"totalResults": 1, "resultsPerPage": 1}} |