java - How to catch one specific text from html source code using Jsoup? -


i tried solution from:

  1. how extract text of paragraph html using jsoup?
  2. jsoup how extract text

but both examples working texts tags.

i have unique piece of code on html web search:

enter image description here

and what need take link comes d.href variable.

i tried codes like:

  elements link = jsoupconnection.select(":contains(d.href)");     elements link = jsoupconnection.select("#d.href");   elements link = jsoupconnection.getelementsbyattributevaluecontaining("d.href","google"); 

but until none of them worked.

i tried make 1 research @ http://jsoup.org/cookbook/ , nothing sucessfull. more experienced jsoup me please?? in advance

in case of text doesn't come tag specific catch jsoup select elements, should download hole page (which can elements link = jsoupconnection.select("*");) , open on application 1 text file retrieve whatever want. if downloaded file big, , problem, try limit file size download; more details can find on links:

  1. limiting file size creation java
  2. how limit file size in java

Comments