Advertisement
FichteFoll

Export all Twitch VoDs to Youtube

Aug 19th, 2014
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Instructions - MUST READ
  2.  *
  3.  * Usage: FireFox with FireBug console (multi-line, jQuery)
  4.  *
  5.  * All VoDs must be visible. For this, scroll down until no more videos are loaded.
  6.  * Then, try to export a video. You have to authorize with YouTube first, maybe twice even.
  7.  * Make sure that exporting works and that the green "notification toaster" pops up showing
  8.  * success.
  9.  *
  10.  * Your YouTube account must be verified, by SMS code for example, to allow videos longer than 15min.
  11.  * Otherwise, uncomment the code below.
  12.  *
  13.  */
  14.  
  15. (function ($) {
  16.     var buttons = $(".actions .action-menu-list li:nth-of-type(2) a");
  17.  
  18.     function export_video (i) {
  19.         var bt = buttons.get(i);
  20.         if (bt === undefined)
  21.             return;
  22.  
  23.         var title = $.trim($(bt).parents(".meta").find(".title a").text());
  24.         console.log("exporting: " + title);
  25.         bt.click();
  26.  
  27.         setTimeout(
  28.             function () {
  29.                 $("#privacy_settings").val("private");
  30.                 // Uncomment this if you, for some reason, can not upload videos longer than 15min:
  31.                 // $("#do_split").val("on");
  32.  
  33.                 $("#upload_form_container .buttons .primary").click();
  34.  
  35.                 setTimeout(
  36.                     function () {
  37.                         export_video(i - 1);
  38.                     },
  39.                     500
  40.                 );
  41.             },
  42.             300
  43.         );
  44.     }
  45.  
  46.     // Iterate buttons backwards so that the oldest video is uploaded first
  47.     export_video(-1);
  48. })
  49. (jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement