filmpreservation.org link extractor

Prints the video direct download link

  1. // ==UserScript==
  2. // @name filmpreservation.org link extractor
  3. // @namespace surrealmoviez.info
  4. // @description Prints the video direct download link
  5. // @include http://www.filmpreservation.org/preserved-films/screening-room/*
  6. // @grant none
  7. // @version 0.0.1
  8. // ==/UserScript==
  9.  
  10. $('<h2 style="font-size: 11px; color: grey; margin-bottom: 7px;">Download link: <span id="direct-link">Not found</span></div></h2>').insertAfter('h3.video');
  11.  
  12. var visibleLink = $('#film > p > a:contains(HERE)');
  13. if (visibleLink.length === 1) {
  14. $('#direct-link').text(visibleLink.attr('href'));
  15. } else {
  16. $('#direct-link').text('http://s3.amazonaws.com/nfpf-videos/' + $('#film .film-player').attr('data-download-file'));
  17. }