Guest User

Groupees Bundle Download Script

a guest
Jul 14th, 2022
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // PRELIMINARY STEPS
  2. //
  3. // 1. Install the DownThemAll! extension (DTA) by Nils Maier for your browser.
  4. //
  5. // 2. Under DTA's Network preferences, add a new limitation for domain 'groupees.com' with "Concurrent Connections"
  6. //    set to 1.  This can greatly reduce chances of failed downloads.
  7. //
  8. // 3. Optionally, temporarily change your browser's download location to where you wish to deposit your files.
  9. //
  10. // 4. Turn off your browser's inquiry where to save each downloaded file as DTA may use that setting as well.
  11. //
  12. // 5. Make sure your clipboard is free for use.
  13. //
  14. //
  15. // USAGE
  16. //
  17. // 1. Navigate to https://groupees.com/purchases
  18. //
  19. // 2. Open the browser's Developer Tools (press F12).
  20. //
  21. // 3. Paste the script below in the Console.
  22. //
  23. // 4. Open up any bundle you wish to download.
  24. //    Make sure all desired items in the bundle are revealed.
  25. //
  26. // 5. You can now [Ctrl] + Right Click anywhere in the opened bundle to trigger the script, which will do 2 things:
  27. //    - It will select all contents in that bundle.
  28. //      Note that you can always make custom selections as well, and work your way through bundles in parts.
  29. //    - It will copy the date & title of the bundle to the clipboard, formatted as "YYYYMMDD TITLE".
  30. //      Feel free to modify the script to change the format to your liking.
  31. //
  32. // 6. In the context menu that popped up, you can directly choose "DownThemAll! -> Save Selection with DownThemAll!".
  33. //
  34. // 7. The DTA downloads screen pops up.
  35. //    - Make sure you're on the Links tab (first tab).
  36. //    - In field "Fast Filtering", enter "https://storage.groupees.com/".  This will filter out everything but
  37. //      the actual files to download.
  38. //    - Tweak the current selection further if needed.  Each URL also hints what kind of file it will be:
  39. //        https://storage.groupees.com/albums/... for music,
  40. //        https://storage.groupees.com/games/... for games,
  41. //        https://storage.groupees.com/other_products/... for comics, ebooks, videos, licenses, etc.
  42. //    - In field "Subfolder", paste your clipboard.  This will populate the field with the date & title of the bundle.
  43. //    - Hit "Download" or "Add paused".
  44. //
  45. // 8. Let the manager run through its queue.
  46. //
  47. //
  48. // SCRIPT
  49. //
  50. const months = ['!', 'JANUARY', 'FEBRUARY', 'MARCH', 'APRIL', 'MAY', 'JUNE', 'JULY', 'AUGUST', 'SEPTEMBER', 'OCTOBER', 'NOVEMBER', 'DECEMBER'];
  51. document.querySelector('#profile_content').addEventListener('auxclick', event => {
  52.     const item = event.target.closest('.profile-item');
  53.     if (item && event.ctrlKey) {
  54.         const title = item.querySelector('.caption').textContent;
  55.         const date = [...item.querySelector('.info').childNodes].pop().textContent;
  56.         const [, month, day, year] = date.match(/\s*on\s*(\w+) (\d+), (\d+)\s*/);
  57.         const clipboardText = `${year}${months.indexOf(month.toUpperCase()).toString().padStart(2, '0')}${day.padStart(2, '0')} ${title}`;
  58.         navigator.clipboard.writeText(clipboardText).then(
  59.             () => console.info(`Item:`, item, `\nCopied to clipboard: "${clipboardText}"`),
  60.             () => console.warn(`Item:`, item, `\nFailed to copy to clipboard: "${clipboardText}"`)
  61.         );
  62.         document.getSelection().selectAllChildren(item);
  63.     }
  64. });
  65.  
Advertisement
Add Comment
Please, Sign In to add comment