Application to get live USD/INR rate Using Python
In this article, we are going to write a python scripts to get live information of USD/INR rate and bind with it GUI application.
- bs4: Beautiful Soup is a Python library for pulling data out of HTML and XML files.
pip install bs4
- requests: This module allows you to send HTTP/1.1 requests very easily.
pip install requests
- Extract data from the given URL. Copy the URL, after selecting the desired location.
- Scrape the data with the help of requests and the Beautiful Soup module.
- Convert that data into HTML code.
- Find the required details and filter them.
Step 1: Import all the modules required.
Step 2: Create a URL get function
Step 3: Now pass the URL into the getdata() function and convert that data(currency details) into HTML code.
The URL used here is https://finance.yahoo.com/quote/usdinr=X?ltr=1
Step 4: Filter the currency details and quality(increment/decrement) according to the given data.
'73.2610-0.2790 (-0.38%)As of 3:30PM BST. Market open.'
Below is the complete program implemented using tkinter module.
My Personal Notes arrow_drop_up
Please Login to comment...