-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmxlrc_fetch_lyrics.py
30 lines (26 loc) · 3.64 KB
/
mxlrc_fetch_lyrics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Tried using methods to fetch lyrics from mxlrc, but it was not working. So, I used syncedlyrics library to fetch lyrics from lrclib provider.
# Finally found out about lrclib so directly using the API in frontend.
ids = ['ddOfQZO5tfU','yP9KiFTyBks','kZqH9Kfv6BI','re5VHo6wS28','vvLBXO94EfA','L0zKs8i7Nc8','Ci0WbaUH3no','juZN67BA_5w','uQ763VvqiEM','cajMxG9Y-Dk','2uUmHTgT65I','UuQjAqO-WUM','69CEiHfS_mc','k4yXQkG2s1E','EEX_XM6SxmY','9vw2MvyBjUQ','rW9_-dVCmrM','p062GuAhsRs','lESv_sgXW2U','zg6ku9DwaPE','NTHz9ephYTw','ZHsKQ_R0ZqI','92J9p0VplTo','z2MSS3gWj0U','hjWf8A0YNSE','U7wqFFJURvk','BAeGLiBZuiQ','NbWKYgaWzbI','j6muwUGdvXw','_KhQT-LGb-4','_cPHiwPqbqo','GOkJguI8kYc','0BOekEZXjmQ','W9mrvDWUR9g','S0WPSYFm7iE','0bAVd9jJE2Q','HgIW7P4dsXU','WM0i4jhKRxc','8LZgzAZ2lpQ','2ll4IA146YI','8R5puyLx7Qo','60vIVA5AZ9M','BCTbl7BXuug','1EadhOBcfI0','MhXvQWvxENA','1J6qc2mQZ7k','AB1U75cMP6w','Gop2g29j70Q','e8B0AzmXPV8','uTqBoUFbMVs','95I5VaR7GeU','FxAG_11PzCk','zC3UbTf4qrM','pO-b3u3DCCs','m_4lF320DfQ','II2EO3Nw4m0','dv_Qjzca56k','xitd9mEZIHk','9yGukg6SSZ4','wDIrpvH8MzE','ZTmF2v59CtI','PaDaoNnOQaM','JFcgOboQZ08','i0_m90T04uw','qFkNATtc3mc','7TRFf7uUfhQ','Pkh8UtuejGw','rap8SoUIPaw','KgmeL_xuB0I','Y7G-tYRzwYY','7Ib33wy6OT4','dkedupX73xs','xWi8nDUjHGA','Rd9wF5fAnVw','1tVL11ULjYY','oCBDl58lBoU','udra3Mfw2oo','YmXJp4RtBCM','mcL6ZErM49Q','q_0uF80IZXM','RpuhD_xKadk','WuMWwPHTSoY','_uUdJalMaF8','9mWdw-09dso','P-FF3wqE69Y','jCEdTq3j-0U','b4b1cMVZOUU','Qdz5n1Xe5Qo','1jjDs69WWUQ','b6133U-zmqQ','kw2M0zM2pjo','DUW4T_maiIY','FQS7i2z1CoA','2IGDsD-dLF8','yIIGQB6EMAM','SD4Z8dlZPd8','bUTdUaVmj8o','hlvbDjksdCg','LYEqeUr-158','1BWdglekty0','1cDoRqPnCXU','o1RducJbUdc','l_MyUGq7pgs','vZ_NpLWuL00','emdoqHkeAE8','Tkgad9gngOQ','caoGNx1LF2Q','nCD2hj6zJEc','tzRFLMn4kpM','66VN2ZIWPnw','Sv_kEdNwYtQ','NBw5Gdmb1Pg','HqUeSjsYLNU','8XtXLVylOoU','SAiyopkF22M','EsXG4YET4zs','UY5pjZkKo5c','Q7kv9nuhTB8','iQXePTLyCUk','0-ggsgFh5TI','rLR37BR88T0','x4UjdNUjwoQ','mVxMqmeeLXc','d4_szl5EEww','zpsVpnvFfZQ','0KNk-Joi-NM','tnrnRQb8v-M','w_HaezV0DqI','yN21C972fsE','46GGxF_Bwhg','1YBl3Zbt80A','hejXc_FSYb8','5X7WWVTrBvM','YpkJO_GrCo0','oWknlFu0D9Q','8qs2dZO6wcc','dYVPuOazLzc','kayOHvB-vX8','q0hyYWKXF0Q','aJOTlE1K90k','ULbgRLSvtHI','PHskP9wglJ8','iMdH_G4N9nY','FS9dkwhPypY','hMy5za-m5Ew','iXP1HvvN_A4','V-aWMKcuJSo','Pc2PTRafvzg','l75z7FrYRXI','vjOKuvBjkS8','XLqmL9cPN1E','5lf_Ujt0BXo','Wd2B8OAotU8','yDv0WSgXJVg','FDzYegv8JHE','5eyflIV8pzM','GLW0hl9ZzNQ','YxWlaYCA8MU','-Q8mrKJ1Jps','iAIBF2ngbWY','0WtRNGubWGA','JGwWNGJdvx8','Fg_9gLeVV2E','BQ0mxQXmLsk','xtkeK-KI1wg','QxfTgQNwywU','VAdGW7QDJiU','Mpy0UzbHNr0','fdubeMFwuGs','r4K-ptmVHaA','bNBZbIeWy4U','Nnop2walGmM','sAzlWScHTc4','QwnJJXyrZhw','jgYl4hZacx0','huXCTt-lYzs','IBvg3WeqP1U','UGkLd1pxHQ0','k85mRPqvMbE','APHgDFRpCi0','sYeBnmwiWzA','GUBa1wRxQko','aWMTj-rejvc','iwlUeXLPvf0','0JLRExeOH-k','GtQstf_sGr4','zNMGiMg75zg','kfXU_Vs0fVk','tn3wc-JwGKQ','vK5E_aeBGYA','K9UUbq0SZcw','C8kSrkz8Hz8','3nA1hmKCRpE','oAVhUAaVCVQ','kMRRIMmICmM']
import os
import time
import syncedlyrics
# cd to MxLRC directory
os.chdir('MxLRC')
# run the command
with open('songs.txt','r') as file:
s = file.readline()
i = 0
while s:
s = s.strip()
artist, title = s.split(',')
artist = artist.strip()
title = title.strip()
# print(f'python mxlrc.py -s "{s}" --token 220821abc2b9a588bf69c9fe54fa7eefd879241a779c51c42eb5a1 --output "{ids[i]}.lrc"')
# os.system(f'python mxlrc.py -s "{s}" --token 220821abc2b9a588bf69c9fe54fa7eefd879241a779c51c42eb5a1 --output {ids[i]}.lrc')
lrc = syncedlyrics.search(f"{title} {artist}", providers=['lrclib'])
print(lrc)
s = file.readline()
i += 1
# time.sleep(2)
if i == 20:
break