Node.js Express Pinterest API Project to Download Image & Video Post From URL in Browser Using JS
Jan 9, 2025
Buy the full source code of the application here:
https://procodestore.com/index.php/product/node-js-express-pinterest-api-project-to-download-image-video-post-from-url-in-browser-using-js/
Buy Premium Scripts and Apps Here:
https://procodestore.com/
Show More Show Less View Video Transcript
0:01
uh hello guys welcome to this live
0:03
stream so in this live stream I will
0:05
actually tell you about a project that I
0:08
developed which allows you to uh
0:11
download Pinterest post which includes
0:14
uh images gifts and videos so it is
0:17
actually built inside nodejs and express
0:21
and you can just see the live demo of
0:23
the application what we will be building
0:24
in this live stream so this is actually
0:27
a application where we have an input
0:30
field out there here you can need to
0:31
enter the Pinterest URL of the post that
0:34
you want to download so Pinterest is
0:37
basically a website social media website
0:39
right here and you can type any right
0:42
here in the let's suppose this is
0:46
actually a image I will simply copy this
0:50
uh if you want to just need to copy this
0:53
link and plug this link inside this
0:56
application simply paste the link right
0:58
here and there is a download post option
1:00
button right here if you click this
1:02
button there this image will get
1:04
downloaded and it will be displayed full
1:06
HD image you will see that this image
1:08
will be displayed it will be fetched
1:09
using Pinterest API we are using it in
1:11
the background to actually fetch this
1:14
Photograph and you can even see open
1:16
image in new tab and you can directly
1:18
save this image by right clicking it
1:20
save this image on your local machine it
1:24
is saved as a JPG image you can see that
1:27
so we you don't need API key for the
1:30
this purpose we are you can do it
1:31
unlimited number of time you just need
1:33
to go it can even download videos as
1:36
well let's suppose uh we have this video
1:40
that we want to download again you need
1:43
to copy the
1:44
link and just paste it inside this
1:47
application click on download post and
1:49
once again this thumbnail of the video
1:51
will be shown right here and there is a
1:54
download post button if you click this
1:56
button the video will open with the
1:59
sound as well you will see that the
2:01
sound is also coming for the video and
2:03
uh you can just click these option there
2:07
is a download button coming click on
2:09
download and your video will be
2:11
downloaded as a mp4 file you will see
2:13
that now you can play this video inside
2:15
your local machine in a video
2:18
player you can see
2:21
that so the video is playing right here
2:24
so in this way you can actually download
2:26
the Pinterest post it can be either
2:29
video or image or a GI file anything you
2:32
just need to paste the link of the
2:35
anything that you want to download right
2:39
here you can see just need to copy the
2:42
link right here and uh plug this link in
2:45
the application and rest it will do the
2:48
job for you open the
2:51
video you can see that so there is this
2:53
download button you can open
2:57
this so if you need this application
3:00
guys the full source code is given you
3:02
can directly purchase the full source
3:03
code project with full
3:05
application uh from my website proot
3:08
store.com the link is given in the
3:10
description so uh after you purchase it
3:13
you will actually get a zip file uh
3:16
which will actually contain this
3:17
directory structure which will actually
3:19
contain the JavaScript code nodejs
3:22
express code and the EGS code so for the
3:25
specific purpose I made a specific
3:27
module here which is called coding sixa
3:29
pter downloader so this custom nodejs
3:32
module interacts with the Pinterest API
3:34
in the background and that actually
3:36
allows you to download the Pinterest
3:39
post from the URL that you submit right
3:41
here so whenever
3:43
you copy the link here so what this
3:47
application is doing it is actually
3:49
interacting with the Pinterest API and
3:52
actually fetching this download link
3:53
when you open this so you can see this
3:56
is the actual link of the video which is
3:58
hosted on Pinterest so it is actually
4:00
communicating with the Pinterest API to
4:02
actually fetch this download link so now
4:04
I will show you how it's works so let me
4:06
delete all the source code and start
4:08
from scratch so for this specific
4:11
purpose you need to install
4:14
the uh initialize your nodejs project
4:17
and install these two modules Express
4:20
and EGS so these two modules are
4:22
required for this application so I will
4:25
just start the index. GS file so now
4:28
inside my index JS file first of all
4:31
what I will do I will simply start my
4:34
Express server so I will simply require
4:36
it express and I will simply make a new
4:39
Express app and listen this application
4:42
on Port
4:46
5000 so app is listening on Port
4:50
5,000 and here we need to set the view
4:53
engine which is actually embedded
4:55
JavaScript template which is EGS and
4:58
also we need to simp simply go to Just
5:01
configure a simple route so whenever
5:04
someone goes to the homepage we will
5:06
simply render a template which is index
5:08
template so generally all the templates
5:11
are stored inside the views folder so
5:13
just make a views folder in the root
5:14
directory and just make this file index.
5:16
EGS file this will actually contain the
5:19
HTML code so we can simply say Pinterest
5:22
image and video
5:27
downloader so right here uh we do need
5:30
to include the bootstrap CDM for styling
5:33
purpose so simply copy this link after
5:35
the title paste it this is a CDN for
5:38
bootstrap and here we will be using the
5:41
bootstrap classes container mt5 margin
5:45
top
5:46
5 and here we will be having an
5:50
heading which Pinterest video and image
5:57
downloader so if you go to the Local
6:00
Host
6:02
5,000 you will see this will be the
6:04
heading right here and now what we need
6:07
to do we need to have a simple form
6:09
right here so this form will actually
6:11
make a post request the action here will
6:14
be slash Pinterest
6:17
downloader so inside this form we will
6:20
actually be having a input field where
6:22
we will allow the user to actually write
6:25
the URL for the Pinterest
6:28
post so these are all bootstrap classes
6:31
form label so here we will simply say to
6:33
the user that enter the Pinterest post
6:36
URL and after that inside this input
6:40
type text field the user will enter the
6:43
URL of the post that needs to be
6:45
downloaded it should be required you
6:48
will give it a name parameter to it of
6:50
URL so that we can Target it inside
6:52
Express placeholder we will simply give
6:55
to the user so placeholder generally
6:58
tells user what to write inside this
7:00
input field so this will be a simple
7:02
Pinterest URL like this and we will also
7:05
be giving a bootstrap class of form
7:08
control so if you just refresh there
7:10
will be this input field added where we
7:13
will actually write our Pinterest URL of
7:15
the post so after this we will actually
7:18
be having a button to actually submit
7:21
the form and we will simply say Here
7:22
download post so we will be giving a
7:25
class to it of BTN BTN primary this is
7:29
actually a bootstrap class a blue button
7:31
will be added download post and now we
7:35
just need to make this post request
7:37
which is Pinterest downloader inside
7:40
index.js just say app.
7:43
poost
7:45
Pinterest
7:48
Pinterest
7:50
uh whatever we call this here Pinterest
7:53
downloader
7:59
so this will be Asing function because
8:02
we do do need to use a weight keyword so
8:04
that's why this will be Asing keyword so
8:08
I need to now import the special module
8:10
that I specifically made for this
8:12
application which you will get after the
8:13
payment that you will uh to actually
8:16
purchase this source code so I made this
8:18
specific module which interacts with the
8:20
Pinterest API which is called as coding
8:22
sixa Pinterest downloader so after you
8:25
purchase it you will actually get this
8:27
uh module automatically the node modules
8:30
folder so you just need to require it at
8:33
the top and it contains this method
8:35
Pinterest and right here we will
8:37
actually
8:39
be now we also need to include body pass
8:43
middleware so for that we just need to
8:45
write this two lines of
8:48
middleware so if you don't write this
8:50
you will get an error so just write URL
8:52
encoded extended false Express Json so
8:55
right here first of all we will get the
8:57
URL that the user has written by using
8:59
using request. body. URL this is
9:02
actually the name parameter that we have
9:03
given right here if you see name is
9:06
equal to URL so after you get the URL we
9:09
can actually start downloading inside TR
9:12
catch
9:17
block so inside the tri block we can
9:20
simply get we can download the await we
9:24
can actually call this method and pass
9:27
the URL and now we can console of data.
9:31
URL and data. thumbnail so it will
9:34
actually return all these uh the
9:36
thumbnail of the video or the URL of the
9:39
video in the console so if you just
9:41
start your application put the link here
9:44
click on download post it is saying
9:46
cannot
9:48
post uh let me see what is the problem
9:50
app
9:51
post I let's Pinterest downloader sorry
9:56
this needs to be action not accept
10:02
so just put the URL click on download
10:05
post and if you check the console you
10:07
will actually see it has returned the
10:09
URL because this is a image you can
10:12
directly copy this URL right here and
10:14
directly open it in the
10:17
browser so you can see it is returning
10:19
the post here which is actually a image
10:22
file
10:24
so for the
10:28
video for the video it will actually
10:34
be if you see it will now return this uh
10:39
MP4 link right here if you
10:42
see so it will actually return this MP4
10:45
link and you can directly paste it as
10:48
well
10:54
so so this is now we just need to
10:57
display this information right in the
10:59
browser so how we can do that so for
11:03
doing this uh if you see right here we
11:06
just need to send this information back
11:09
to the
11:10
EGS template so we can simply say
11:13
response. render Index this time we will
11:16
be passing these two things variables
11:18
image data. thumbnail video will be
11:21
data. URL so we just need to make sure
11:24
that these two things are initialized
11:26
image is undefined or video is undefined
11:30
just make sure that you do this and
11:33
after we do this now we just need to
11:35
display these two things in the ejs
11:37
template so just after the form we will
11:40
actually be writing some ejs and image
11:44
and video if they exist in that
11:49
case this is actual syntax of EGS if you
11:53
don't know embedded JavaScript template
12:00
so right inside this if condition we
12:03
will actually be writing some
12:04
HTML to actually show
12:08
the in the center
12:15
screen so we will be showing the image
12:18
if the image is downloaded like this
12:22
image variable in the image
12:27
tag and and right after this if the if
12:32
this is a video then in that case we
12:34
will also be showing the thumbnail of
12:36
the
12:37
video a download button sorry this will
12:40
be the href tag and uh this will be the
12:43
actual link of the post so whenever you
12:45
click this link it will redirect you to
12:48
the actual link of the
12:51
post so you'll give it a class of it BTN
12:56
BTN success it's a green button so now
12:59
if
13:03
you you can see that post link is
13:05
displaying this is actually a video so
13:08
the thumbnail of the video is showing if
13:10
you click the download post buttons so
13:12
you can see that
13:14
the video is playing so you can simply
13:16
download this video by clicking download
13:18
button and you can see that so if it's a
13:23
image if it's a image right
13:26
here you can
13:36
you can see that uh copy image
13:55
address just need to copy this link
13:57
right here and simply paste
14:07
it so you can see that the image is
14:11
displaying you can simply save this
14:12
image file right clicking it and saving
14:15
this
14:18
image so this is a Pinterest uh
14:20
downloader that we developed guys using
14:23
Pinterest module in nodejs Express if
14:26
you are interested in the project you
14:28
can directly go to the link on Pro Cod
14:30
store.com and purchase the full source
14:32
code you will actually get a zip file
14:34
after the payment from Google Drive
14:35
automatically so if you're interested
14:37
you can go to it and please hit that
14:39
like button subscribe the channel as
14:41
well and I will be seeing you guys in
14:43
the next uh video thank you very much
#Music Streams & Downloads
#Online Media
#Programming
#Web Services
#Online Goodies
#Clip Art & Animated GIFs
#Photo & Video Sharing
#Photo & Image Sharing
#Video Sharing
