remove some debugging stuff

This commit is contained in:
Erin 2018-02-25 16:51:29 -06:00
parent 46719ac9ba
commit 4aad04dd39

View file

@ -10,8 +10,6 @@ def search_youtube(q, max_results=1, key=None):
params={'q': q, 'type': 'video', 'maxResults': max_results, params={'q': q, 'type': 'video', 'maxResults': max_results,
'part': 'snippet', 'key': key}) 'part': 'snippet', 'key': key})
print(r.json())
items = [] items = []
for item in r.json()['items']: for item in r.json()['items']:
items.append({'id': item['id']['videoId'], 'title': item['snippet']['title']}) items.append({'id': item['id']['videoId'], 'title': item['snippet']['title']})
@ -31,10 +29,7 @@ class NowplayingBot(PineappleBot):
username=self.config.lastfm_username, username=self.config.lastfm_username,
password_hash=self.config.lastfm_password_hash) password_hash=self.config.lastfm_password_hash)
# kick off the post task instantly (for dev, TODO: remove) @interval(30)
self.post_np()
@interval(10)
def post_np(self): def post_np(self):
# grab the track from the last.fm api # grab the track from the last.fm api
currently_playing = self.lastfm.get_user(self.config.lastfm_username).get_now_playing() currently_playing = self.lastfm.get_user(self.config.lastfm_username).get_now_playing()