I am using Python3 on Windows10X64 (Ananconda is installed). I am trying to get the value in a span element using urllib and BeautifulSoup . In Chrome, it shows 8000, but it always gives 0 letter for my code result.
Can anyone suggest a way to get the real number as shown in the Chrome web browser ?
here is my code.
from bs4 import BeautifulSoup
from urllib.request import Request, urlopen
url ='https://www.futbin.com/18/squad/100133002/sbc'
req = Request(url,headers={'User-Agent': 'Mozilla/5.0'})
page_html = urlopen(req).read()
page_soup = BeautifulSoup(page_html,'html.parser')
page_soup.findAll("div", {"class": "ps4-price"})
The result is lower.
[<div class="ps4-price">
<img class="price-platform-img" src="https://cdn.futbin.com/design/img/logos/full_small/ps_blue.png"/>
<div class="price-row-text" id="squad-price-ps3"><span class="psprice2">0</span></div>
</div>]
In the span tag, it should show the same value (for example, 8000,9000) as shown in Chrome / Firefox
source
share