I am trying to extract the image from above xpath from app store: https://apps.apple.com/us/app/mercer-marketplace-benefits/id1041417557
I tried the following code using the xpath:
driver.get('https://apps.apple.com/us/app/mercer-marketplace-benefits/id1041417557')
rating_distr = WebDriverWait(driver,30).until(EC.presence_of_element_located((By.XPATH, """(//*[@id="ember290"]/div/div[2])""")))
print(rating_distr.get_attribute('innerHTML'))
But the output is not an image:
<figure class="we-star-bar-graph">
<div class="we-star-bar-graph__row">
<span class="we-star-bar-graph__stars we-star-bar-graph__stars--5"></span>
<div class="we-star-bar-graph__bar">
<div class="we-star-bar-graph__bar__foreground-bar" style="width: 76%;"></div>
</div>
</div>
<div class="we-star-bar-graph__row">
<span class="we-star-bar-graph__stars we-star-bar-graph__stars--4"></span>
<div class="we-star-bar-graph__bar">
<div class="we-star-bar-graph__bar__foreground-bar" style="width: 12%;"></div>
Is there any way to extract the output as an image? Thanks for the help!