MCPcopy Create free account
hub / github.com/geekcomputers/Python / get_rating

Method get_rating

JustDialScrapperGUI/Justdial Scrapper GUI.py:72–79  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

70
71 @staticmethod
72 def get_rating(body):
73 rating = 0.0
74 text = body.find("span", {"class": "star_m"})
75 if text is not None:
76 for item in text:
77 rating += float(item["class"][0][1:]) / 10
78
79 return rating
80
81 @staticmethod
82 def get_rating_count(body):

Callers 1

start_scrapping_logicMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected