python:deezer-album-tracker
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python:deezer-album-tracker [2024/03/31 02:47] – Wulf Rajek | python:deezer-album-tracker [2024/04/21 20:05] (current) – Wulf Rajek | ||
---|---|---|---|
Line 25: | Line 25: | ||
Example output: | Example output: | ||
< | < | ||
- | $ ./dat.py --days 7 | + | $ /dat.py --days 7 |
Albums released in the past 7 days: | Albums released in the past 7 days: | ||
- | Release Date: 2024-03-29 | ||
- | Artist: Beyoncé | ||
- | Album Name: COWBOY CARTER [EXPLICIT] | ||
- | Link: https:// | ||
- | Release Date: 2024-03-29 | + | Release Date: 2024-04-19 |
- | Artist: | + | Artist: |
- | Album Name: Lonely Cowboy | + | Album Name: Better Days (feat. Dorothy) (1 track) |
- | Link: https:// | + | Link: https:// |
- | Release Date: 2024-03-29 | + | Release Date: 2024-04-19 |
- | Artist: | + | Artist: |
- | Album Name: Be Okay | + | Album Name: Nova (3 tracks) |
- | Link: https:// | + | Link: https:// |
+ | |||
+ | Release Date: 2024-04-19 | ||
+ | Artist: Taylor Swift | ||
+ | Album Name: THE TORTURED POETS DEPARTMENT [EXPLICIT] (16 tracks) | ||
+ | Link: https:// | ||
</ | </ | ||
Line 197: | Line 198: | ||
if (datetime.strptime(earliest_release, | if (datetime.strptime(earliest_release, | ||
datetime.strptime(today, | datetime.strptime(today, | ||
+ | trackresponse = requests.get(album[' | ||
+ | request_count += 1 | ||
+ | if trackresponse.status_code == 200: | ||
+ | tracklist = trackresponse.json() | ||
+ | trackamount = tracklist[' | ||
+ | else: | ||
+ | trackamount = 0 | ||
+ | |||
albums.append({ | albums.append({ | ||
' | ' | ||
' | ' | ||
' | ' | ||
+ | ' | ||
' | ' | ||
' | ' | ||
Line 286: | Line 296: | ||
albums = get_albums(artist_ids, | albums = get_albums(artist_ids, | ||
- | output = f" | + | output = f" |
for album in albums: | for album in albums: | ||
output += f" | output += f" | ||
output += f" | output += f" | ||
+ | output += f" | ||
if album[' | if album[' | ||
- | output += f"Album Name: {album[' | + | output += " [EXPLICIT]" |
- | | + | |
- | output += f"Album Name: {album[' | + | output += f" |
+ | if album[' | ||
+ | output += " | ||
+ | output += " | ||
+ | output += "\n" | ||
output += f" | output += f" | ||
output += " | output += " |
python/deezer-album-tracker.1711849661.txt.gz · Last modified: 2024/03/31 02:47 by Wulf Rajek