idiotbox

youtube scraping and interfaces: CGI, Gopher, CLI
Log | Files | Refs | README | LICENSE

README (1435B)


      1 Dependencies:
      2 -------------
      3 
      4 - C compiler.
      5 - LibreSSL + libtls.
      6 
      7 
      8 Compile
      9 -------
     10 
     11 - make
     12 - doas make install
     13 
     14 
     15 Features
     16 --------
     17 
     18 - Doesn't use JavaScript.
     19 - Doesn't use (tracking) cookies.
     20 - CSS is optional.
     21 - Multiple interfaces available: CGI web, CLI, gopher (gph), this is a
     22   work-in-progress.
     23 - Doesn't use or require the Google API.
     24 - CGI interface works nice in most browsers, including text-based ones.
     25   On OpenBSD it runs "sandboxed" and it can be compiled as a static-linked
     26   binary with pledge(2), unveil(2) in a chroot.
     27 
     28 
     29 Cons/caveats
     30 ------------
     31 
     32 - Order by upload date is incorrect (same as on Youtube).
     33 - Some Youtube features are not supported.
     34 - Uses scraping so might break at any point.
     35 
     36 
     37 Install HTTP CGI
     38 ----------------
     39 
     40 Nginx + slowcgi example:
     41 
     42 	location /idiotbox/css/.* {
     43 		root /home/www/domains/www.codemadness.org/htdocs/idiotbox/css;
     44 	}
     45 
     46 	location ~ ^/idiotbox(/|/\?.*)$ {
     47 		include /etc/nginx/fastcgi_params;
     48 		fastcgi_pass  unix:/run/slowcgi.sock;
     49 		fastcgi_param SCRIPT_FILENAME  /cgi-bin/idiotbox;
     50 		fastcgi_param SCRIPT_NAME  /cgi-bin/idiotbox;
     51 		fastcgi_param REQUEST_URI  /cgi-bin/idiotbox;
     52         }
     53 
     54 httpd + slowcgi example:
     55 
     56 	location match "/idiotbox" {
     57 		root "/cgi-bin/idiotbox.cgi"
     58 		fastcgi
     59 	}
     60 
     61 
     62 When using a chroot make sure to copy /etc/resolv.conf and /etc/ssl/cert.pem.
     63 
     64 To test from the command-line you can do:
     65 
     66 	QUERY_STRING="q=funny+cat+video" ./main | sed 1,2d | lynx -stdin