Hey together,
i try to get the lowest possible Price from here:
So there are two options:
- get the first index of the list or
- get the value between the list and the comments.
I wanted to try Option two:
The Problem is: If i set everything up in Hassio, i dont get any value back. it’s just unknown.
also i tried the Python Script:
from bs4 import BeautifulSoup
import requests
# Change these 2 things
URL="https://www.keyforsteam.de/xbox-game-pass-ultimate-key-kaufen-preisvergleich/"
# This is the select line you will use in the config
SELECT=".lowPrice"
INDEX=1
# You may need to use a template after the fact...
r = requests.get(URL)
data=r.text
# Print the output of the request command to see what we even get.
#print(data)
soup = BeautifulSoup(data,"html.parser")
# See what the select returns
val = soup.select(SELECT)
print(val)
# Try to get to the lowest thing we can...
#value = val[INDEX].text
#print(value)
# From here on out, we have to do template code to pair it down more.
But got nothing back… What am i doing wrong?