We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 289c456 commit 3e45088Copy full SHA for 3e45088
1 file changed
plugins/youtube.py
@@ -14,7 +14,7 @@
14
15
base_url = 'https://www.googleapis.com/youtube/v3/'
16
api_url = base_url + 'videos?part=contentDetails%2C+snippet%2C+statistics&id={}&key={}'
17
-search_api_url = base_url + 'search?part=id&q={}&maxResults=1&key={}'
+search_api_url = base_url + 'search?part=id&maxResults=1'
18
video_url = "http://youtu.be/%s"
19
20
@@ -85,9 +85,9 @@ def youtube(text):
85
if json['pageInfo']['totalResults'] == 0:
86
return 'no results found'
87
88
- video_id = json['items'][0]['id']
+ video_id = json['items'][0]['id']['videoId']
89
90
- return get_video_description(video_id) + " - " + video_url % video_id
+ return get_video_description(video_id, dev_key) + " - " + video_url % video_id
91
92
93
@hook.command("youtime", "ytime")
0 commit comments