Erogedownload link scrapper

Scrape free download links from Erogedownload and put them into your clipboard

  1. // ==UserScript==
  2. // @name Erogedownload link scrapper
  3. // @namespace https://greasyfork.org/en/users/381705-takase1121
  4. // @version 1.0
  5. // @description Scrape free download links from Erogedownload and put them into your clipboard
  6. // @author Takase
  7. // @match *://erogedownload.com/downloads/*
  8. // @grant GM_registerMenuCommand
  9. // @grant GM_setClipboard
  10. // @grant GM_notification
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. GM_registerMenuCommand('Copy links to clipboard', function() {
  16. // select the proper download div
  17. var links = Array.prototype.slice.call(document.querySelector('div[data-title="Free download"]').children);
  18. var filteredLinks = [];
  19. for (var i = 0; i < links.length; i++) {
  20. if (links[i].nodeName !== 'A') continue;
  21. filteredLinks.push(links[i].href);
  22. }
  23. GM_setClipboard(filteredLinks.join('\n'), 'text');
  24. GM_notification(filteredLinks.length + ' link' + (links.length > 1 ? 's are' : ' is') + ' copied to clipboard', 'Links copied to clipboard');
  25. })
  26. })();