5
Tahaga
6y

Has someone here already used jsoup? 🤔🤔

Comments
  • 1
    Ye, but its really unneccessary
  • 2
    yeah it's great
  • 1
    Haha, 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
  • 1
    Ask away, but im not an expert lol
  • 0
    So 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
  • 0
    I 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
  • 1
    Elements fuckMe = doc.select("jernierArticles")

    Maybe?

    Edit; ye i cant fucking read, berniesandersarticles or what the fuck is the class
  • 0
    And 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)
  • 1
    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
  • 0
    @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
  • 0
    I hate it but I used it a couple times
Add Comment