@@ -20,8 +20,8 @@ def room_scrape(link="https://music.apple.com/us/room/6748797380"):
2020
2121 Notes
2222 -----
23- This function parses the `serialized-server-data` script tag within
24- the Apple Music room HTML, locates the 'copper-track-swoosh' section,
23+ This function parses the `serialized-server-data` script tag within
24+ the Apple Music room HTML, locates the 'copper-track-swoosh' section,
2525 and extracts track URLs.
2626 """
2727 result = []
@@ -222,9 +222,9 @@ def search(keyword="sasha sloan"):
222222 )
223223 result ["albums" ].append (
224224 {
225- "title" : title ,
226- "artist" : artist ,
227- "url" : url ,
225+ "title" : title ,
226+ "artist" : artist ,
227+ "url" : url ,
228228 "image" : img
229229 }
230230 )
@@ -247,7 +247,7 @@ def search(keyword="sasha sloan"):
247247 {
248248 "title" : title ,
249249 "artist" : artist ,
250- "url" : url ,
250+ "url" : url ,
251251 "image" : img
252252 }
253253 )
@@ -420,7 +420,8 @@ def song_scrape(url="https://music.apple.com/us/song/california/1821538031"):
420420
421421def album_scrape (url = "https://music.apple.com/us/album/1965/1817707266?i=1817707585" ):
422422 """
423- Scrape an Apple Music album page and extract metadata, songs, related albums, videos, etc.
423+ Scrape an Apple Music album page
424+ and extract metadata, songs, related albums, videos, etc.
424425
425426 Parameters
426427 ----------
@@ -766,7 +767,7 @@ def artist_scrape(url="https://music.apple.com/us/artist/king-princess/134996853
766767
767768 Notes
768769 -----
769- This is the most complex scraper and extracts ~12 different sections
770+ This is the most complex scraper and extracts ~12 different sections
770771 from the artist page.
771772 """
772773 result = {
@@ -1001,7 +1002,6 @@ def test_all_functions():
10011002 - Counts of returned items.
10021003 - Key fields such as title, preview-url existence, etc.
10031004 """
1004-
10051005 print ("\n === TEST: room_scrape ===" )
10061006 try :
10071007 r = room_scrape ()
@@ -1068,5 +1068,3 @@ def test_all_functions():
10681068 print ("artist_scrape ERROR:" , e )
10691069
10701070 print ("\n === ALL TESTS COMPLETED ===" )
1071-
1072- test_all_functions ()
0 commit comments