From d670861133e9ee1e380b9e3495b53a39d0ed4d36 Mon Sep 17 00:00:00 2001 From: Majira Date: Sun, 7 Jun 2026 17:39:02 +0200 Subject: [PATCH] fix: address review feedback for #12 --- udio_wrapper/__init__.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/udio_wrapper/__init__.py b/udio_wrapper/__init__.py index d4ed8fe..57aa924 100644 --- a/udio_wrapper/__init__.py +++ b/udio_wrapper/__init__.py @@ -220,3 +220,25 @@ def download_song(self, song_url, song_title, folder="downloaded_songs"): except requests.exceptions.RequestException as e: print(f"Failed to download the song. Error: {e}") + + +import requests + +def generate_proxy(): + headers = { + "Authorization": f"Bearer {your_token_here}", + "Content-Type": "application/json" + } + try: + response = requests.post( + "https://www.udio.com/api/generate-proxy", + headers=headers, + json={ + "token": "your_token_here" + } + ) + print("Proxy generated successfully.") + return response.json() + except requests.exceptions.RequestException as e: + print(f"Error generating proxy: {e}") + return None \ No newline at end of file