Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Tahaga7647yHaha, you both are kinda contradictary 😂
Would some of you mind helping me for a few basic questions ? I'm kind of a noob at it and the requests and stuggling a bit with the doc -
Tahaga7647ySo basically I'm building a simple app for my school that scrapes the latest articles from it's website and simply displays them as a list in a recyclerview and toi you can then access the details.
I got the details activity working fine, but got a problem with the list :
The recycler view etc is not the issue, I tested it and it works. But my problem is selecting all articles on the site with jsoup and getting their URLs and Titles into arrays (then I would use those arrays to create my article objects for the adapter).
I'll show you an image of how the site's built to be clearer -
Tahaga7647yI need to get all the links of every article and every title. I don't really get how to do it for all of them
-
Elements fuckMe = doc.select("jernierArticles")
Maybe?
Edit; ye i cant fucking read, berniesandersarticles or what the fuck is the class -
Tahaga7647yAnd then I'm able to get those elements into an array with a for loop right?
(Yeah it's french whatever 😂 their site is some weird generated shit anyways) -
https://jsoup.org/apidocs/org/...-
Here u go, youll need this, you can get the divs into a list and then insert the tip of your pe... I mean get their attributes
Also please @BindView if u reply to me else i dont get notified -
Tahaga7647y@BindView oh yeah sorry forgot that! Thanks for the help, I'll go check it out now :)
Edit : Got you some ++'s for the help :D
Related Rants
Has someone here already used jsoup? 🤔🤔
rant
android
jsoup
java
kotlin