Skip to content

Instantly share code, notes, and snippets.

@tom-henderson
Created October 16, 2014 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom-henderson/4aeced81e795366f4ffb to your computer and use it in GitHub Desktop.
Save tom-henderson/4aeced81e795366f4ffb to your computer and use it in GitHub Desktop.
Fetch Zomato Rating
import requests
from bs4 import BeautifulSoup as bs
url = "https://www.zomato.com/auckland/bread-butter-bakery-grey-lynn"
html = requests.get(url).text
soup = bs(html)
rating = float(soup.find("div", class_="rating-div").text.strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment