I have this script in powershell to get value of visitors at webpage:
$visitors = Invoke-WebRequest -Uri https://footballarena.org
$visitors = $visitors.AllElements | where class -EQ "right" | select -ExpandProperty innertext
$visitors = $visitors -replace '\D+'
$visitors | Export-Csv $env:USERPROFILE\Desktop\export.txt
The output is only numerical value of single DIV class "right"
Now I need to do the same script in python. I can read and store the page:
web = urllib.request.urlopen("https://footballarena.org").read()
Now I need to select value of "161" from this single class:
<div class="right">161 online</div>
I found this question, but I'm not sure how to use it - Python Selenium selecting div class
Could anybody help please?