Function is called only once in whole code. When I added a simple in to be raised by +1. It counts as normal 1,2,3..
def is_in_highscores():
world = "Monza"
high_score_site = f"subtopic=highscores&world={world}&beprotection=-1&category={6}&profession=0¤tpage={6}"
soup = high_score_suffix(high_score_site)
high_score = soup.find_all(class_="DoNotBreak")
for i in high_score:
a = (i.findParent())
b = [element.text for element in i.findParent().contents]
print(b)
I guess it has something do to with double <td class="DoNotBreak".. This is what "a" is:
<tr style="background-color:#D4C0A1;"><td>300</td><td class="DoNotBreak"><a href="https://www.tibia.com/community/?subtopic=characters&name=Faje">Faje</a></td><td class="DoNotBreak">Elder Druid</td><td>Monza</td><td style="text-align: right;">637</td><td style="text-align: right;">4,283,568,941</td></tr>
And this is what is printed as b.
['298', 'Loveable Wicked', 'Master Sorcerer', 'Monza', '638', '4,288,783,674']
['298', 'Loveable Wicked', 'Master Sorcerer', 'Monza', '638', '4,288,783,674']
['299', 'Sleepy Bzyku', 'Elite Knight', 'Monza', '637', '4,285,301,108']
['299', 'Sleepy Bzyku', 'Elite Knight', 'Monza', '637', '4,285,301,108']
['300', 'Faje', 'Elder Druid', 'Monza', '637', '4,283,568,941']
['300', 'Faje', 'Elder Druid', 'Monza', '637', '4,283,568,941']