Skip to content

Instantly share code, notes, and snippets.

@gilillo32
gilillo32 / saved_song_links_downloader.py
Last active February 22, 2023 15:15
Script to write in a file line by line all your Spotify saved songs' urls.
@gilillo32
gilillo32 / comprobador_documentacion.py
Created November 17, 2022 00:33
¿Harto de entrar carpeta a carpeta para ver si los chavalucos han traído su documentación para el campa? ¡Ejecuta este script donde estén las carpetas y en menos de un segundo tendrás la respuesta que buscas!
import os
import re
def main():
medi = re.compile(".*medicamentos*", re.I)
osaki = re.compile(".*osaki*", re.I)
cont = 0
for (root, dirs, files) in os.walk('.'):
if not ('general' in root.lower() or '.' == root):
@gilillo32
gilillo32 / homemade-wrapped.py
Created December 10, 2024 21:14
Homemade Spotify Wrapped
import json
from collections import defaultdict
"""
This script reads the streaming history data from the file 'streaming_history_combined.json' and processes it to find
the top 10 artists and tracks by count and by time, as well as the total listening time. The data is filtered to only
include tracks listened to in the year 2024 between January 1st and November 15th. This has be done to compare
the results with the data from the Spotify Wrapped 2024. After some tests and playing with the parameters, we can see
that the data from the Spotify Wrapped 2024 is not the same as the data from the streaming history. This can be due to
a variety of reasons: The criteria for counting or excluding playing time, the criteria for counting or excluding song