Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. package qlerin;
  2.  
  3. import com.jaunt.*;
  4. import com.jaunt.component.Label;
  5.  
  6. import java.util.List;
  7.  
  8. public class Main {
  9.  
  10. public static void main(String[] args) {
  11.  
  12.  
  13. try{
  14. UserAgent userAgent = new UserAgent();
  15. userAgent.visit("http://content.warframe.com/dynamic/rss.php");
  16.  
  17. Elements items = userAgent.doc.findEach("<item>");
  18. System.out.println("Found " + items.size() + " activities:");
  19. for(Element item : items){
  20. int length = (item.getText().length());
  21. if(length == 36){
  22. System.out.println("Found AlertData");
  23. String guid = item.findFirst("<guid>").getText();
  24. System.out.println(guid);
  25.  
  26. }
  27. }
  28.  
  29. }
  30. catch(JauntException e){ //if an HTTP/connection error occurs, handle JauntException.
  31. System.err.println(e);
  32. }
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement