Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7027517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:15:31+00:00 2026-05-28T00:15:31+00:00

I’m relatively new to using jsoup, and I can’t seem to find the correct

  • 0

I’m relatively new to using jsoup, and I can’t seem to find the correct query to parse out the value I’m looking for. The HTML is as follows.

    <img src='http://rootzwiki.com/public/style_images/ginger/t_unread.png' alt='New Replies' /><br />

</a>
</td>
<td class='col_f_content '>



    <h4><a id="tid-link-12251" href="http://rootzwiki.com/topic/12251-romlte-rootzboat-403-v61/" title='View topic, started  17 December 2011 - 09:32 AM' class='topic_title'>[ROM][LTE] RootzBoat 4.0.3 V6.1</a></h4>
    <br />
    <span class='desc lighter blend_links'>
        Started by <a hovercard-ref="member" hovercard-id="5" class="_hovertrigger url fn " href='http://rootzwiki.com/user/5-birdman/'>birdman</a>, 17 Dec 2011

    </span>

        <ul class='mini_pagination'>


                    <li><a href="http://rootzwiki.com/topic/12251-romlte-rootzboat-403-v61/" title='Go to page 1'>1</a></li>




                    <li><a href="http://rootzwiki.com/topic/12251-romlte-rootzboat-403-v61/page__st__10" title='Go to page 2'>2</a></li>




                    <li><a href="http://rootzwiki.com/topic/12251-romlte-rootzboat-403-v61/page__st__20" title='Go to page 3'>3</a></li>




                    <li><a href="http://rootzwiki.com/topic/12251-romlte-rootzboat-403-v61/page__st__1990" title='Go to page 200'>200 &rarr;</a></li>


        </ul>

</td>
<td class='col_f_preview __topic_preview'>

        <a href='http://rootzwiki.com/topic/12251-romlte-rootzboat-403-v61/' class='expander closed' title='Preview this topic'>&nbsp;</a>

</td>
<td class='col_f_views desc blend_links'>
    <ul>
        <li>



                    <span class='ipsBadge ipsBadge_orange'>Hot</span>&nbsp;

                <a href="http://rootzwiki.com/index.php?app=forums&amp;module=extras&amp;section=stats&amp;do=who&amp;t=12251" onclick="return ipb.forums.retrieveWhoPosted( 12251 );">1,999 replies</a>
        </li>
        <li class='views desc'>180,213 views</li>
    </ul>
</td>
<td class='col_f_post'>
    <a href='http://rootzwiki.com/user/49940-jakeday/' class='ipsUserPhotoLink left'>
        <img src='http://rootzwiki.com/uploads/profile/photo-thumb-49940.jpg' class='ipsUserPhoto ipsUserPhoto_mini' />
    </a>
    <ul class='last_post ipsType_small'>
        <li><a hovercard-ref="member" hovercard-id="49940" class="_hovertrigger url fn " href='http://rootzwiki.com/user/49940-jakeday/'>jakeday</a></li>
        <li>
            <a href='http://rootzwiki.com/topic/12251-romlte-rootzboat-403-v61/page__view__getlastpost' title='Go to last post'>Today, 04:20 AM</a>
        </li>                               
    </ul>
</td>

I need to parse out birdman from there. I know that once I’ve defined the element, I can get “birdman” out with author.text();, but I cant figure out how to define the author element. I thought perhaps the following block of code would work, but as I mentioned, I’m pretty new to jsoup and html and it obviously didnt work. Theres nothing wrong with the connection, and jsoup is working for the other values I parsed out.

            TitleResults titleArray =  new TitleResults();
                Document doc = null;
                try {
                    doc = Jsoup.connect(Constants.FORUM).get();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                Elements threads = doc.select(".topic_title");
                for (Element thread : threads) {
                    titleArray =  new TitleResults();
                    //Thread title
                    threadTitle = thread.text();
                    titleArray.setItemName(threadTitle);

                    //Thread link
                    String threadStr = thread.attr("abs:href");
                    String endTag = "/page__view__getnewpost"; //trim link
                    threadStr = new String(threadStr.replace(endTag, ""));
                    threadArray.add(threadStr);

                    titleArray.setAuthorDate("Author/Date");
                    results.add(titleArray);
                }
                Elements authors = doc.select("a[hovercard-ref]");
                for (Element author : authors) {
                    if (author.attr("abs:href").contains("/user/")){
                        Log.d("POC", "SUCCESS " + author.attr("abs:href"));
                    } else {
                        Log.d("POC", "FAILURE " + author.text());                           
                    }
                }
        } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:15:32+00:00Added an answer on May 28, 2026 at 12:15 am

    I think you’re thinking too hard 😉

    To get the birdman portion of the link, just use the following:

    Elements authors = doc.select("a");
    for (Element author : authors) {
        Log.d("POC", author.text());
    }
    

    The "a" retrieves all links. After that you can just use the .text() like you said to retrieve the value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.