I want to get the 'Fixtures' data from this page: [Link] using jsoup but I have no clue of how to get the data.
Include Jsoup in gradle
implementation "org.jsoup:jsoup:1.11.3"
Connect to page
Document doc = Jsoup.connect('url').get();
Select and get the element by id or xpath...
Elements el = doc.getElementsByClass("col");
for (int i = 0; i < el.size(); i++) {
if (el.get(i).classNames().contains("col1")) {
Log.d("EL", el.html());
}
if (el.get(i).classNames().contains("col2")) {
Log.d("EL", el.html());
}
if (el.get(i).classNames().contains("col3")) {
Log.d("EL", el.html());
}
}
p.s. You will need to handle asnyc call yourself Jsoup.connect
will throw NetworkOnMainThreadException
if you call it directly in activity.