From 0456c29a5234121c8889b257642c8e8f0882ac09 Mon Sep 17 00:00:00 2001 From: 吳俊翰 Date: Mon, 8 May 2023 15:41:32 +0800 Subject: Update main.py --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index f36ee27..254b431 100644 --- a/main.py +++ b/main.py @@ -306,7 +306,7 @@ def read_agent(): # Choose a random user agent user_agent = random.choice(user_agent_list) - + print("User Agent: " + user_agent) # Set headers with Accept and User-Agent headers = { 'Accept': 'application/json', @@ -324,7 +324,7 @@ def main(): pass_counter = manager.Value('i', 0) song_counter = manager.Value('i', 0) album_counter = manager.Value('i', 0) - + headers = read_agent() file_format = input("Enter the file format to convert to (flac/mp3/all): ") try: @@ -333,7 +333,7 @@ def main(): pass - headers = read_agent() + # Get all albums albums = session.get('https://monster-siren.hypergryph.com/api/albums', headers=headers).json()['data'] for album in albums: -- cgit v1.2.3-70-g09d2