Skip to content

Commit

Permalink
Change YTMusic configuration to use oauth.json and add search functio…
Browse files Browse the repository at this point in the history
…nality for "Oasis Wonderwall"
  • Loading branch information
luisignaciocc committed Nov 18, 2024
1 parent dc54388 commit a992813
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion start.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,14 @@ def get_session(self, token):
raise Exception(e)

def execute(self):
ytmusic = YTMusic("browser.json")
ytmusic = YTMusic("oauth.json")

if not self.session:
token = self.get_token()
self.session = self.get_session(token)
search_results = ytmusic.search("Oasis Wonderwall")
print(search_results)
return
print("Getting history...")
history = ytmusic.get_history()
i = 0
Expand Down

0 comments on commit a992813

Please sign in to comment.