🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #263389

A "Quantum" is so TINY, photons push it around, randomly.

#263389
From: Jeff-Relf.Me
Date: Sat, 11 May 2019 04:02
113 lines
6250 bytes
John Gohde wrote:
> FoxFire has pretty much stopped working

Mozilla remotely disabled my Firefox 56 (2017) extensions !
So I'm customizing the latest version of Firefox, "Quantum"
( a "Quantum" is so TINY, photons push it around, randomly ).

When my hacks go wrong, because Quantum doesn't want "hackers" (people)
tampering with their precious product ( blocking their ad revenue ), 
I use either "-safe-mode" ( the command line switch ) or Google Chrome.

Getting everything to open in a new tab is VERY difficult;
" Tab Mix Plus " doesn't work anymore, thanks to TINY Quantum; 
so I'm using the (flaky) "Open In New Tab" extension on 
" *YouTube.COM " and " *Google.COM ".

While I enjoy "hacking", it's time consuming, and I sometimes give up;
if you have less experience than me, as most do, you'll give up sooner.

> YouTube Downloader plugin still works in Ubuntu,
> I mainly use YouTube in Ubuntu Mate for watching full length movies.
> 
> now that I have gotten the Kodi Media Center to work with video add-ons,
> there is little need to download anything.

Using my custom console, "X.EXE", I run:

  /__/EXEs/YouTube-DL  --embed-subs  --write-auto-sub --no-playlist
    --buffer-size 222k  -f "bestvideo[height<=720]+bestaudio/best"
    -o "../MKV/-- YouTube Recent/%(title)s -- %(id)s  .%(ext)s"
    YouTube.COM/watch?v=diPrOl4QZ_E

" YouTube-DL ", which works on hundreds of sites, outputs:

  WARNING: The url doesn't specify the protocol, trying with http
  [YouTube] diPrOl4QZ_E: Downloading webpage
  [YouTube] diPrOl4QZ_E: Downloading video info webpage
  [YouTube] Downloading just video diPrOl4QZ_E because of --no-playlist
  [YouTube] diPrOl4QZ_E: Looking for automatic captions
  [info] Writing video subtitles to: ..\MKV\-- YouTube Recent\Ten of the Most Influential Philosophers of the Twentieth Century & What They Believed -- diPrOl4QZ_E  .en.vtt
  [download] 100% of 79.69MiB in 00:31                 
  [download] 100% of 12.71MiB in 00:05                 
  [ffmpeg] Merging formats into "..\MKV\-- YouTube Recent\Ten of the Most Influential Philosophers of the Twentieth Century & What They Believed -- diPrOl4QZ_E  .mp4"
  Deleting original file ..\MKV\-- YouTube Recent\Ten of the Most Influential Philosophers of the Twentieth Century & What They Believed -- diPrOl4QZ_E  .f136.mp4 (pass -k to keep)
  Deleting original file ..\MKV\-- YouTube Recent\Ten of the Most Influential Philosophers of the Twentieth Century & What They Believed -- diPrOl4QZ_E  .f140.m4a (pass -k to keep)
  [ffmpeg] Embedding subtitles in '..\MKV\-- YouTube Recent\Ten of the Most Influential Philosophers of the Twentieth Century & What They Believed -- diPrOl4QZ_E  .mp4'
  Deleting original file ..\MKV\-- YouTube Recent\Ten of the Most Influential Philosophers of the Twentieth Century & What They Believed -- diPrOl4QZ_E  .en.vtt (pass -k to keep)

From " X.CPP " in " Jeff-Relf.Me/X.ZIP ":

  //  "fnVid" ( YouTube.COM/watch?v=diPrOl4QZ_E ) 
  //  comes from the command line ( sent from a YouTube page ) 
  //  -- or from the clipboard, when the "Vid" button is hit.
  //  
  //  In Firefox, I right-click a video link ( in YouTube ) 
  //  and select " Open in IE " so "X.EXE" downloads it.
  //  
  //  The " [download] 100% of 12.71MiB in 00:05 " line
  //  continually updates ( CreatePipe() ), as "YouTube-DL" runs.

  GetVideo() { LnP  B, P = fnVid, E = 0, Command_Line = _T ;  

    SECURITY_ATTRIBUTES Inherit = { sizeof( SECURITY_ATTRIBUTES ) };
    ClearScreen, Inherit.bInheritHandle = 1 ;  

    //  Strip off leading+trailing crap from a USENET post:
    LoopP( White || Ch == '<' || Ch == '>' );
    fnVid = B = Loc( L"://", P ) ? P_Find + LenPat : P ;
    LoopBacP( White || Ch == '>' );  

    //  In my custom console, Sh() is printf().
    P[1] = 0, Sh( L"\n--%s--\n\n%s\n\n", fnVid, gVideo );
    Str( Command_Line, L"%s  %s", gVideo, fnVid );

    PROCESS_INFORMATION Stat = {};  
    STARTUPINFO SU ={ sizeof( STARTUPINFO ) };
    SU.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;

    SU.wShowWindow = SW_HIDE ;  static  HANDLE  r, w ;
    CreatePipe( &r, &w, &Inherit, 0 );
    SetHandleInformation( r, HANDLE_FLAG_INHERIT, 0 ); 

    SU.hStdOutput = SU.hStdError = w ; 
    SU.hStdInput = GetStdHandle( STD_INPUT_HANDLE ) ;
    if ( !CreateProcess( 0, Command_Line, 0,0,1,0,0,0, &SU , &Stat ) ) {

      Sh( L"[ %s ] failed to run.", Command_Line );  
      CloseHandle( SU.hStdOutput );  goto  EoStream ;  }

    else { 

      CloseHandle( w );  //  <== a vital, CRITICAL, TRICK !!! 
      int  EoStream = 0 ;

      while ( Nap(), !EoStream && WaitForSingleObject( Stat.hThread, 0 )
        && ( _Sz = 0, _B = _LnP( _B_Sh ),

        //   ReadFile() hangs if you call it when "EoStream" is true.
        EoStream = !ReadFile( r, _B, mxBytesSh, (ulong *)&_Sz, 0 )
        || !_Sz, _Sz ) )  

            _E = _B + _Sz, _E[ -1*( _E[-1] == 10 ) ] = 0,
            *_B == 13 ? _B++, Ln.PP-- : 0, Sh( L"%S", _B );

      CloseHandle( Stat.hProcess ), CloseHandle( Stat.hThread );  }

   EoStream:
       //  Append the results to my "╲╱.TXT" file:
       Sh( Sep ), MsgOnTop = 1, SaveShowReport( L"╲╱" );

       if ( CloseHandle( r ), OneNDone )

         WinProc( Win, WM_SYSCOMMAND, SC_CLOSE, 0 );  }
Technical Details
Message-ID: <Jeff-Relf.Me@May.10--9.02pm.Seattle.2019>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
References: <82f43eb3-d7d5-45b6-9626-3a35a641af84@googlegroups.COM>

Show Full Headers
Complete Article Headers
Message-ID: <Jeff-Relf.Me@May.10--9.02pm.Seattle.2019>
Subject: A "Quantum" is so TINY, photons push it around, randomly.
Date: Sat, 11 May 2019 04:02:58 +0000
From: Jeff-Relf.Me @.@
References: <82f43eb3-d7d5-45b6-9626-3a35a641af84@googlegroups.COM>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
Content-Type: Text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Newsgroups: comp.os.linux.advocacy,sci.physics,alt.checkmate,news.software.readers,alt.free.newsservers,comp.lang.c++
User-Agent: Jeff-Relf.Me/X.HTM
Lines: 113
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Sat, 11 May 2019 04:03:00 UTC
Organization: blocknews - www.blocknews.net
X-Received-Bytes: 6063
X-Received-Body-CRC: 3709008137