I'm currently trying to parse text from a specific web page, which works fine so far. I'm just struggling "getting" the text to work with it further on.
My code looks like this so far:
basename (URL which will be scraped in general)
request_two = requests.get("https://www.billiger.de/shops?shopsearch=" + basename)
def find_tags_from_class(html):
soup = BeautifulSoup(html.content, "html.parser")
div = soup.find("div", class_="svg-rating-stars large blue")
print(div)
This prints out <div class="svg-rating-stars large blue" style="--rating: 100.0"></div>
or <div class="svg-rating-stars large blue" style="--rating: 98.3"></div> (depends on the shop(basename) which is going to be checked by the user)
Since this can vary, I want to check if the rating which is parsed in the class "svg-rating-stars large blue" is larger or equal 80. Is there a possibility to do this ? I'm pretty new to python and webscraping and can't find any solution right now.