简体   繁体   中英

extract URL with jsoup

I'm trying to extract some url of a web page but I cant. Could you help me

String url = "http://www.cadenaser.com/rssaudio/larguero.html";

Elements etiqueta = doc.getElementsByTag("guid"); System.out.println("ETIQUETA GUID " + etiqueta.toString());

    for (Element guids : etiqueta) {
              result.add(guids.toString());
              String urlssss = guids.absUrl("guid");
               System.out.println("CadenoooNNNNN ESSSSS " + urlssss);

              }

I only would like to get the urls: strin1= http://www.cadenaser.com/cadenaser/podcast/audios/cadenaser_larguero_20110304csrcsrdep_1_Aes.mp3 string2=http://www.cadenaser.com/cadenaser/podcast/audios/cadenaser_larguero_20110304csrcsrdep_1_Aes.mp3 ......

Any help? Many thanks and sorry for my english!

您应该尝试使用Java RSS库 ,例如Rome

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM