Created
February 16, 2024 15:33
-
-
Save tempoguyx/325dc7432abe1b39c44b96eb2a42ac89 to your computer and use it in GitHub Desktop.
Delete duplicates in Debrid Media Manager
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 characters
| // this should run only on this page. | |
| // https://debridmediamanager.com/library?status=sametitleorhash&page=1 | |
| // open browser console (ctrl+ shift + I), paste this script. | |
| const deleteDupe = async (el = document) => { | |
| let items = el.querySelectorAll('table.w-full tr.align-middle'); | |
| let sleep = async (ms) => await new Promise(resolve => setTimeout(resolve, ms)); | |
| for (let i = 0; i < items.length; i++) { | |
| let deleteButton = el.querySelector("#__next > div > div:nth-child(7) > table > tbody > tr:nth-child(1) > td.px-1.py-1.flex.place-content-center > button.cursor-pointer.mr-2.mb-2.text-red-500"); | |
| if (deleteButton) { | |
| console.log(`--- Deleting ${i} of ${items.length} ----`); | |
| deleteButton.click(); | |
| console.log(`--- Delete complete ---`); | |
| await sleep(2000); | |
| } | |
| } | |
| console.log('--- Done Deleting all duplicates ---'); | |
| } | |
| deleteDupe(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't work anymore. Would you please revise it? Thanks!