Python Web Scraping Script to Scrape Real Time Currency Exchange Rates from Google Using BS4 Library
947 views
Jun 3, 2025
Get the full source code of application here:
View Video Transcript
0:00
uh hello guys welcome to this video so
0:02
in this video I'll show you a simple uh
0:04
Python module which actually uh does the
0:08
web scraping and actually scrapes the
0:10
live currency rate of all the currencies
0:13
in the world and displays the result in
0:15
the terminal so you need not have to use
0:18
any sort of API key paid API for uh
0:21
building any sort of currency kind of an
0:23
application currency converter so we
0:26
have using this you will see we have a
0:29
set of currencies uh USD to a AUD
0:33
Australian dollar so we're converting
0:35
this if I execute this Python script you
0:37
will see it will exactly fetch the live
0:40
rate from Google using web scraping
0:42
using beautiful soup in the background
0:45
and it is exactly telling me that 100
0:47
USD is equal to
0:49
154.17 AUD you can even cross check as
0:53
well by just typing here 100 USD to AUD
0:58
and then it will exactly fetch this rate
1:01
live rate from Google you will see
1:03
roundabout
1:05
155.51 so right it's correct you can use
1:09
any currency let's suppose I want to
1:11
change this to USD to INR Indian rupees
1:15
so you will
1:18
see it will be like this let me refresh
1:22
it 100 USD is equal to
1:24
8509 INR so you can
1:28
just so it is fetching this all this
1:30
data from live from
1:32
google.com so in the background it is
1:35
fetching this data so 8563 if you see
1:38
that roundabout it is correct so there
1:43
is this is actually a free module inside
1:46
Python you can install this simple
1:49
currency converter so if you just go to
1:51
this website just search for this
1:56
module so the commands is simple simply
1:59
install this by executing this command
2:01
pip install simple currency converter so
2:04
it's a third party modules made by
2:06
somebody and once you install this you
2:09
can even use it in the command line as
2:12
well by going to command line just
2:14
typing
2:16
here uh first of all let me show you how
2:19
to use it in the actual script so first
2:21
of all you simply import this module
2:24
from simple currency converter you need
2:26
to import this function here
2:30
convert and then you
2:32
basically use this convert function and
2:35
specify the currency name that you want
2:38
to convert from so I will say I want to
2:42
convert from USD
2:45
to euro U and then you specify the value
2:49
so 100 USD ins I need to convert and
2:54
then you simply print the
2:57
result
2:58
100 USD is equal to that much of euro so
3:04
if you just execute this application
3:09
so 100 USD is equal to 8 9
3:15
37485 so
3:21
roundabout you'll see it is correct
3:23
result 8 93
3:27
0 so in this way guys uh you can see we
3:30
are not using any sort of API key you
3:32
can use this unlimited number of time
3:35
for completely free i recently explored
3:38
this module last week so if you go to
3:41
their website they do have a nice little
3:44
documentation and uh they also have all
3:47
the currency code stored so if you do
3:51
this it has the crypto codes as well so
3:56
cryptocurrencies also I think it's
3:58
available you'll see it will return a
4:01
JSON object which will contain all the
4:03
currency codes USD dollar euro British
4:07
pound Canadian dollar Australian dollar
4:11
Japanese Indian rupee all the major
4:13
currencies are there and you can even
4:16
print out cryptocurrencies are as well i
4:19
think crypto codes are also there and
4:22
then you
4:24
can can print out
4:27
everything you can see that it also
4:30
contains this uh cryptocurrencies as
4:33
well i think you can
4:41
see so you can check out their
4:48
uh documentation it's actually behind
4:51
the scenes it is using beautiful soup
4:54
and also it is using this
4:56
uh uh API
4:59
here so you can see no rate limits are
5:02
there so there is no limits out there
5:04
you can use it unlimited number of times
5:06
you're developing some kind of web
5:07
application involving currencies and
5:10
cryptocurrencies
5:15
you can even use it in the command line
5:17
as well after installing this i think
5:20
you can
5:21
even but at the time is it is not
5:25
working but you can try this it's a
5:27
great
5:29
module and uh I think let me explore
5:33
this example
5:36
uh and just ask here chat GPT to make a
5:41
cryptocurrency converter so I will just
5:46
say modify this example
5:50
to change Bitcoin
5:54
to
6:02
Ethereum so yeah
6:04
so it is it doesn't work with cryp
6:07
cryptocurrencies it it just work with
6:09
the flat currencies I think yeah so you
6:12
can use this for flat currencies
6:14
conversion from one currency to another
6:16
it typically works it's a great module
6:19
you can see
6:23
that so thank you very much guys for
6:26
watching this video and please hit that
6:29
like button subscribe the channel and
6:31
also check out my website
6:32
freemediatetools.com
6:34
uh which contains thousands of tools
#Currencies & Foreign Exchange
#Investing