today we're going to take a look at some
more tools
that allow for browser-less consumption
of the internet
that way there's no need to follow any
spyware mitigation guides for your
particular browser
you don't have to worry about installing
add-ons to protect you from spyware
these are simple tools and you should
always remember that the spooks
hate simplicity they fear the terminal
and what it can do to protect your
privacy
so the first tool that we're going to
take a look at allows you to
scrape reddit images and then view them
in your terminal
with sxiv or any other image viewer
that just happens to be the same one
that the author of the script happened
to use
so in the readme here we can see to set
it up you're going to have to create a
cache directory and you're going to have
to
create a red yt directory inside of your
config folder
and you'll also have to create a
subreddit.txt file now
you don't actually have to put anything
in this subreddit.txt file
you should just think of this as like a
favorites list so you'll probably want
to put the name of subreddits
that you're going to view a lot so let's
take a look at this
here in my terminal
so we'll do red yt
and then you can see that's the list of
subreddits that i talked about so why
don't we just do like
memes
and then there we go so now we have all
of these
images from the subreddit i can hit
enter to go into
the thumbnail mode so you can see
they're all loaded here inside of my
terminal
oh this one's actually pretty good leave
a f in the comments for
to pay respects to flash uh so yeah
there you go we're able to look at
subreddits um we can also do this
so like i said it doesn't have to you
don't have to put all of the subreddits
into
that text file you can type in like
linux memes so i don't have that in the
file
and then there we go so we're looking at
all the images from our slash linux
memes
now i know that someone's probably gonna
say it so
obviously you can't see comments uh
you're not
creating a reddit account to do this so
you can't get that precious
karma and those awards and all that
stuff that reddit does
um so this is gonna be for people that
don't care about all of this stuff
uh personally i'm not really interested
in seeing comments from reddit i usually
find them unfulfilling
and uh you know their their rules and
stuff on there
usually makes it so that quality bans
are not possible so
i'm not really interested in having an
account on reddit if
you are then i guess you have to
actually use reddit to view the stuff
so yeah there you go
and why don't we take a look at how this
script actually works because
it's it's pretty tiny you know there's
not a lot of code behind it
so basically what we've got going on
here is
this is just setting up d menu to
display
that subreddit txt your list of
favorites essentially
and prompt you to enter the name of the
subreddit you want to look at
then we have this cache that's being set
up here for however many
posts that you want to load into it and
then it's just notify send so this won't
show up if you don't actually have
i think it's like xlib notify or
something like that on your system
if you do have it then you'll get a
notification dialog that pops up
but that's not a hard dependency as you
saw the script worked without it
uh then it's just curling your
uh your link that you passed to it so
you've got the subreddit but
here we see it's looking for a json so
you know this is normally what like
nature's metal would look like if you
just loaded it into
your browser but if we get rid of this
actually we want to look at the json of
it
so there you go if you just put like dot
json at the end you get this page so
the json is essentially a way that's
easier for the data to be parsed by
different programming languages so
you probably wouldn't browse reddit this
way for doing it through the browser but
like if we go to
let's see this would be the fourth post
and then
data and then url
overwritten this should be
the image of our crocodile bro and there
we go so
this is basically what's getting grabbed
by that script
and then like i said it's putting it
into that cache directory
and then when you exit out of it it's
just going to remove all of them and of
course it has support for
jpegs png and gif files
so if you want to download this you
could just go ahead and
get it from the github i'll go ahead and
leave a link to it in the directory
below i mean in the description below
so the next tool that we're going to
take a look at is
for scraping youtube videos well
actually watching
get getting youtube videos and being
able to search for them from the command
line as well
and also i just wanted to mention bugs
writer since
he also has a youtube channel so this is
the same
author of the script that we just took a
look at i think he has a video about it
on his channel as well
yeah this one here so yeah he does he
does the youtube thing
definitely check him out if you want to
see other tools
that he's going to make in the future so
yeah we'll take a look at
this one next this is by i guess saiyan
or seon
i hope i'm pronouncing your name right
so this again
just like this reddit script allows us
to
get content from youtube and it's not
even using their
api uh that should have been obvious
from looking at the source code but yeah
this guy's script doesn't use reddit's
api
and this isn't using youtube's api uh so
basically
it's kind of doing the same thing with
mpv like i've
made videos about how you can play
youtube links in mpv
uh so obviously that's gonna be a
dependency of it and youtube dl
uh you need a fuzzy finder and you need
either
roofie or d menu so you've got a little
bit of flexibility there
so in a nutshell what this is doing is
it's getting a link
from youtube and by using youtube search
functions so the results that you get
are going to be displayed
similarly to what you would get if you
actually went to youtube and search for
something
uh of course there's not going to be
like the algorithm
filtering the results because there's no
accounts associated with this so
keep that in mind and then it shows you
the titles and then you choose one it
uses mpv
to play it on your desktop so on my
system
i named it to yts just because i already
had
another alias for yt
and so search so let's well we just do
bugs writer
let me see is it two g's or one one g
so we can just search for him and uh
here we go
i think this is that one
of him showing his own reddit script
and so now it's playing an mpv
so you can full screen it you can do
everything else that
mpv allows you to do
and of course you're not going to see
the thumbnail of it
i'm pretty sure that youtube needs
scripts
in order to view thumbnails because uh
just on
um like i know when you disable scripts
in your browser
usually you don't see thumbnails in
youtube if you disable all scripts that
is
so if you can figure out what content
you want to watch
just based off of like just the title
then this is going to be a pretty good
solution for you watching youtube
without the browser
so hope you enjoyed hope you're going to
find these scripts useful
have a great rest of your day