Subscribe Us

Header Ads

How to Get Current gold price using Python | Python projects

 Hey guys in this video i am gonna tell you How you can get current Gold price using Python Web Scrapping ...




Source Code..


# Required module- pip install requests

import requests

# pip install Bs4

from bs4 import BeautifulSoup

# Passing Request

page = requests.get(

    "https://www.goodreturns.in/gold-rates/#Today+24+Carat+Gold+Rate+Per+Gram+in+India+%28INR%29")


# Getting Content of Page

Soup = BeautifulSoup(page.content, 'html.parser')

# Getting info specific Class

info = Soup.find_all(class_='odd_row')


count = 0

# Getting Date Which we Required...

for items in info:

    count += 1

    if count == 2:


        print(items.get_text())

        break


Post a Comment

0 Comments