I am trying to get the text of the user's rank from this webpage. By "rank" I mean the text you see in the top right corner of the user's info:
In this example rank is "Competitions Master". So how do I get that text?
If you see clearly after inspecting the rank there's <a href = "/progression"
inside of which is a <p>
tag and inside of which there's again a <p>
tag which contains the rank.
First find the container with <a href = "/progression"
and then find all the <p>
tags inside it then again find all <p>
. Print the text present inside the <p>
tag as there is only one <p>
tag inside<a href = "/progression"
then <p>
.
Or there's a second method too: There's a button below "Home" with the name of the rank. You can try scraping that element.