Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions udio_wrapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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