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 8559137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:58:16+00:00 2026-06-11T15:58:16+00:00

I have this html code (part of a long html code) : <div class=yt-lockup-content>

  • 0

I have this html code (part of a long html code) :

<div class="yt-lockup-content">
<h3 class="yt-lockup-ellipsize">
    <a class="yt-uix-contextlink yt-uix-sessionlink yt-uix-tile-link result-item-translation-title"dir="ltr"title="Rihanna ft. Calvin Harris - We Found Love LYRICS"data-sessionlink="ved=CAoQvxs%3D&amp;ei=CPLZjMDLwbICFUag3wod7Dm-pw%3D%3D"href="***/watch?v=1KzEu5hWmRY***">Rihanna ft. Calvin Harris - We Found Love LYRICS</a></h3><p class="description " dir="ltr">
        <b>bla</b> ft. Calvin Harris - 
        <b>bla</b> 
        bla bla
        <b>bla bla bla</b> 
        <b>...</b>
        </p><div class="yt-lockup-meta">    
        <ul class="single-line-lego-list">
      <li>    <a href="/results?search_type=videos&amp;search_query=rihanna+we+found+love&amp;high_definition=1" class="yt-badge-std">HD
      </a> 
</h3>   

And i want to get to this text : href=/watch?v=1KzEu5hWmRY (The bold text).
I know how to get the all line, but how can i grab this text ?
Thanks,
Or.

  • 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-06-11T15:58:18+00:00Added an answer on June 11, 2026 at 3:58 pm

    Here’s an example:

    String html = // your html here ...
    
    Document doc = Jsoup.parse(html);
    
    Element element = doc.select("h3[class=yt-lockup-ellipsize] > a").first();
    String hrefLink = element.attr("href");
    

    However if you want to parse a website, you should use Jsoup.connect("http://link.com").get() instead of Jsoup.parse(html)

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

Sidebar

Related Questions

I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
I have this HTML code which simulates a dropdown multi-checkbox <div> <div class=select> <span>Select
I have this html code: <div class=action> some_text <a class=delete_action name=q1>some</a> </div> <div class=action>
I have this HTML code: <div id=main> <div id=dv_7>...</div> <div id=dv_1>...</div> <div id=dv_8>...</div> <div
I have this piece of HTML code: <tr class=AttCardFooter onMouseOver=this.style.backgroundColor='#E1EAFE' onMouseOut=this.style.backgroundColor='Transparent'>...etc etc.. new lines
I am using jquery Mobile 1.0. I have this html code. <label for=slider class=ui-hidden-accessible>
I have this html: <div class=portlet-header> Company Information ... <button> some button here </button>
I have this html <form method=POST action= id=order class=forms> <div> <span class=col1>Ref.</span> <span class=col2>Number</span>
I have an html code like below(just a part of it) <p> <strong> <div
i have this html code <table style=width: 100%;> <tr> <td> ID </td> <td> <input

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.