0

I am trying to get the inner html of an element on futbin as a learning challenge with the element being a players lowest by now. I can identify the element correctly but the inner html is returning null. The code is below as well as the html code on futbin i am using.

<div id="xboxlowest" class="hide">52000</div>

        final String playerPage = "https://www.futbin.com/21/player/583/alejandro-gomez";
        
        try {
            final Document document = Jsoup.connect(playerPage).get();
            Element price = document.getElementById("xboxlowest");
            System.out.println("Price: " + price.html());
        }
        catch(Exception e){
            e.printStackTrace();
        }
    }

The output i get from this function is

Price:

Im quite new to this web scraping so any ideas as to what im doing wrong but be really appreciated. Thanks for any replies

yesman25
  • 1
  • 2
  • Ive just thought is it maybe because futbin probably update the html through code so maybe i cant read it? – yesman25 Oct 12 '20 at 15:36
  • That value is generated later dynamically (usually by JavaScript). `jsoup` is not browser emulator but HTML parser, so you would need to use other tools like Selenium webdriver which supports JS. – Pshemo Oct 12 '20 at 18:18

0 Answers0