Jsoup Not Parsing Particluar DIv

前端 未结 1 1603
半阙折子戏
半阙折子戏 2020-12-22 07:03

I am unable to get the div \'live ticker\' from here using Jsoup Library.

Here is my code:

Document doc = Jsoup.connect(Link).get(         


        
相关标签:
1条回答
  • 2020-12-22 07:28

    The text in this tag in not part of initial html, but is set by JavaScript after page is loaded. You can check it by disabling JavaScript in your browser. Jsoup only gets static html, does not execute JavaScript code.

    When you examine what connections are made from the page you will find out that the value is updated through request to this API:

    https://shapeshifter-api.onefootball.com/v1/en/match/live-experience/5/6700/718129

    Make a request to this url, parser result and you will get desired value.

    0 讨论(0)
提交回复
热议问题