Home Java - Web Scrapper Issue
Reply: 0

Java - Web Scrapper Issue

user711 Published in July 15, 2018, 9:19 pm

I'm trying to scrape this page https://www.teamrankings.com/nba/team/cleveland-cavaliers but I need the grid that displays when you click 'Betting View'... I'm having some trouble. Is it even possible with the code I have? I'm getting null when I print div.

    String teamLink = "https://www.teamrankings.com/nba/team/cleveland-cavaliers/.betting"; // + Teams[i] + "/";

    Document doc = Jsoup.connect(teamLink).get();

    final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_45);
    HtmlPage page = webClient.getPage(teamLink);
    final HtmlDivision div = page.getFirstByXPath("div.btn-group");

    page = div.click();
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.247647 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO