diff options
author | 吳俊翰 | 2023-05-08 15:41:32 +0800 |
---|---|---|
committer | GitHub | 2023-05-08 15:41:32 +0800 |
commit | 0456c29a5234121c8889b257642c8e8f0882ac09 (patch) | |
tree | fc7979e32579c8d7aaad923a3445f41258bf36c2 | |
parent | 2146f5fb8ed94ba5edf4859261ec9ba241ee43a9 (diff) |
Update main.py
-rw-r--r-- | main.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |