Fix Amazon URL encoding and update buy list

This commit is contained in:
nmemmert committed 2025-11-17 11:21:01 -05:00
1 parent 2893487134
commit e74845cab6
2 files changed
+11 -1

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
Songs not in your library - Amazon search links:
Cochren & Co. - Who Can
https://www.amazon.com/s?k=Cochren%20%26%20%20Co.%20Who%20%20Can&i=digital-music
Matthew West - All In
https://www.amazon.com/s?k=Matthew%20%20West%20All%20%20In&i=digital-music
+3 -1
View File
@@ -21,6 +21,8 @@ import re
from datetime import datetime
import json
import subprocess
import urllib.parse
import urllib.parse
# Configuration (defaults, will be overridden by config.json)
PLEX_TOKEN = 'pU-m3HWYUZU6iXJFhJyA' # Your Plex.tv token
@@ -336,7 +338,7 @@ def main():
artist = song['artist']
title = song['title']
# Create Amazon search URL
query = f"{artist} {title}".replace(' ', '+')
query = urllib.parse.quote(f"{artist} {title}")
url = f"https://www.amazon.com/s?k={query}&i=digital-music"
f.write(f"{artist} - {title}\n{url}\n\n")
print(f" - {artist} - {title}: {url}")