-
-
Save g2p/1e45df5c70a22e2c01edc91978d56896 to your computer and use it in GitHub Desktop.
Revisions
-
g2p revised this gist
Mar 11, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ copy ({ scriptRevision: "0.0.3", listCreated: new Date().toISOString() }, shazamItems: Array.from(document.querySelectorAll('.shazams-content ul.panel-bd.panel-bd-wide .track')) .reverse() // delete this line for date descending order .map((item, index) => ({ no: index + 1, -
hennzen revised this gist
Sep 27, 2020 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,30 +12,32 @@ // { // "meta": { // "scriptUrl": "https://gist.github.com/hennzen/dc2b7bb76ce5507063f6c5e60c68886a", // "scriptRevision": "0.0.3", // "listCreated": "2020-09-27T07:40:06.184Z" // }, // "shazamItems": [ // { // "no": 1, // "title": "Dancing With The Damned", // "artist": "Killing Mood", // "cover": "https://images.shazam.com/coverart/t50270807-b333557118_s400.jpg", // "availableOnAppleMusicPlay": true // } // ] // } copy ({ meta: { scriptUrl: "https://gist.github.com/hennzen/dc2b7bb76ce5507063f6c5e60c68886a", scriptRevision: "0.0.3", listCreated: new Date().toISOString() }, shazamItems: Array.from(document.querySelectorAll('.shazams-content ul.panel-bd.panel-bd-wide')) .reverse() // delete this line for date descending order .map((item, index) => ({ no: index + 1, title: item.querySelector('.title').innerText, artist: item.querySelector('.artist').innerText, cover: item.querySelector('.image.album-art').style['background-image'].match(/"(.*?)"/)[1], availableOnAppleMusicPlay: item.querySelector('article').getAttribute("data-shz-applemusicplay-id").length ? true: false })) }); -
hennzen revised this gist
Sep 27, 2020 . 1 changed file with 23 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,21 +9,33 @@ // 5. Paste the result to your favorite text editor. Voilà. // Output JSON looks like // { // "meta": { // "scriptUrl": "https://gist.github.com/hennzen/dc2b7bb76ce5507063f6c5e60c68886a", // "scriptRevision": "0.0.2", // "listCreated": "2020-09-27T07:40:06.184Z" // }, // "shazamItems": [ // { // "no": 1, // "title": "Dancing With The Damned", // "artist": "Killing Mood", // "cover": "https://images.shazam.com/coverart/t50270807-b333557118_s400.jpg" // } // ] // } copy ({ meta: { scriptUrl: "https://gist.github.com/hennzen/dc2b7bb76ce5507063f6c5e60c68886a", scriptRevision: "0.0.2", listCreated: new Date().toISOString() }, shazamItems: Array.from(document.querySelectorAll('.shazams-content ul.panel-bd.panel-bd-wide')) .reverse() // delete this line for date descending order .map((item, index) => ({ no: index+1, title: item.querySelector('.title').innerText, artist: item.querySelector('.artist').innerText, cover: item.querySelector('.image.album-art').style['background-image'].match(/"(.*?)"/)[1] })) }); -
hennzen revised this gist
Sep 26, 2020 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,11 +19,11 @@ // ] copy( $$('ul.panel-bd.panel-bd-wide') .reverse() // delete this line for date descending order .map((item, index) => ({ no: index+1, title: item.querySelector('.title').innerText, artist: item.querySelector('.artist').innerText, cover: item.querySelector('.image.album-art').style['background-image'].match(/"(.*?)"/)[1] })) ) -
hennzen revised this gist
Sep 26, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ // Order of results is in ascending date order. If you want to change that, delete line with '.reverse()' // The result is copied to your clipboard // // 1. Open https://www.shazam.com/myshazam and login // 2. Scroll down to the end of your list, so that *all* songs are loaded // 3. Open Developer console with F12 // 4. Copy paste this code to the JS-console and hit Enter -
hennzen created this gist
Sep 26, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ // JS-Console script to export song name, artist and cover image URL to a JSON format // Order of results is in ascending date order. If you want to change that, delete line with '.reverse()' // The result is copied to your clipboard // // 1. Open https://www.shazam.com/de/myshazam and login // 2. Scroll down to the end of your list, so that *all* songs are loaded // 3. Open Developer console with F12 // 4. Copy paste this code to the JS-console and hit Enter // 5. Paste the result to your favorite text editor. Voilà. // Output JSON looks like // [ // { // "no": 1, // "title": "Dancing With The Damned", // "artist": "Killing Mood", // "cover": "https://images.shazam.com/coverart/t50270807-b333557118_s400.jpg" // } // ] copy( $$('ul.panel-bd.panel-bd-wide') .reverse() // delete this line for date descending order .map((item, index) => ({ no: index+1, title: item.querySelector('.title').innerText, artist: item.querySelector('.artist').innerText, cover: item.querySelector('.image.album-art').style['background-image'].match(/"(.*?)"/)[1] })) )