README - frontends - front-ends for some sites (experiment)
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
README (1742B)
---
1 Frontends for:
2 * Youtube
3
4
5 Status
6 ------
7
8 Actively maintained:
9 * Youtube
10
11 Unmaintained and archived:
12 * Duckduckgo
13 * Reddit
14 * Twitch (not working anymore, it also now required 2FA and OAUTH).
15
16
17 Dependencies
18 ------------
19
20 * C compiler.
21 * LibreSSL + libtls.
22 * make
23
24
25 Build
26 -----
27
28 To compile a specific front-end:
29
30 $ make youtube
31
32 or all using:
33
34 $ make
35 # make install
36
37
38 Features
39 --------
40
41 - Search videos.
42 - Doesn't use JavaScript.
43 - Doesn't use (tracking) cookies.
44 - CSS is optional.
45 - Multiple interfaces available: CGI web, CLI, gopher (gph), this is a
46 work-in-progress.
47 - Shows an Atom feed of the user/channel.
48 - Doesn't use or require the Google API.
49 - CGI interface works nice in most browsers, including text-based ones.
50 On OpenBSD it runs "sandboxed" and it can be compiled as a static-linked
51 binary with pledge(2), unveil(2) in a chroot.
52
53
54 Cons/caveats
55 ------------
56
57 - Order by upload date is incorrect (same as on Youtube).
58 - Some Youtube features are not supported.
59 - Uses scraping so might break at any point.
60
61
62 Install HTTP CGI
63 ----------------
64
65 Nginx + slowcgi example:
66
67 location /idiotbox/css/.* {
68 root /home/www/domains/www.codemadness.org/htdocs/idiotbox/css;
69 }
70
71 location ~ ^/idiotbox(/|/\?.*)$ {
72 include /etc/nginx/fastcgi_params;
73 fastcgi_pass unix:/run/slowcgi.sock;
74 fastcgi_param SCRIPT_FILENAME /cgi-bin/idiotbox;
75 fastcgi_param SCRIPT_NAME /cgi-bin/idiotbox;
76 fastcgi_param REQUEST_URI /cgi-bin/idiotbox;
77 }
78
79 httpd + slowcgi example:
80
81 location "/idiotbox" {
82 root "/cgi-bin/idiotbox.cgi"
83 fastcgi
84 }
85
86
87 When using a chroot make sure to copy /etc/resolv.conf and /etc/ssl/cert.pem.
88
89 To test from the command-line you can do:
90
91 QUERY_STRING="q=funny+cat+video" ./main | sed 1,2d | lynx -stdin