aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author吳俊翰2023-05-08 15:41:32 +0800
committerGitHub2023-05-08 15:41:32 +0800
commit0456c29a5234121c8889b257642c8e8f0882ac09 (patch)
treefc7979e32579c8d7aaad923a3445f41258bf36c2
parent2146f5fb8ed94ba5edf4859261ec9ba241ee43a9 (diff)
Update main.py
-rw-r--r--main.py6
1 files 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: