This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def convert_usd_to_inr(amount): | |
from_currency = 'usd' | |
to_currency = 'inr' | |
url = "https://api.apilayer.com/exchangerates_data/convert?to={0}&from={1}&amount={2}".format(to_currency,from_currency,amount) | |
payload = {} | |
headers= { | |
"apikey": "<Your API Key>" #Visit "https://apilayer.com/" and create your own api key | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code by Harsh | |
# Python program that compares the price of a product on Amazon and Flipkart using web scraping. | |
""" | |
First, you need to install the requests and beautifulsoup4 libraries. | |
You can do this by running the following command in your terminal or command prompt: | |
pip install requests beautifulsoup4 | |
""" | |
import requests | |
from bs4 import BeautifulSoup |