Guest User

Untitled

a guest
Feb 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. Illegal character in URL
  2. at sun.net.www.protocol.http.HttpURLConnection.checkURL(HttpURLConnection.java:850)
  3. at sun.net.www.protocol.http.HttpURLConnection.<init>(HttpURLConnection.java:857)
  4. at sun.net.www.protocol.http.Handler.openConnection(Handler.java:62)
  5. at sun.net.www.protocol.http.Handler.openConnection(Handler.java:57)
  6. at java.net.URL.openConnection(URL.java:979)
  7. at com.web.DogsDataExtractorV.GetAllDogsData(DogsDataExtractorV.java:74)
  8. at com.web.DogsDataExtractorV.main(DogsDataExtractorV.java:115)
  9.  
  10. try {
  11. Path file_Path = Paths.get("/home/c/cerda/DogsData/upload", "dog-links.txt");
  12. byte[] link_list = Files.readAllBytes(file_Path);
  13. String Link_String = new String(link_list);
  14. System.out.println(Link_String);
  15. GetAllDogsData(Link_String);
  16.  
  17. }catch (Exception e) {
  18. System.out.println(e);
  19.  
  20. Document doc = Jsoup.parse(file, null);
  21. Elements resulCharact = doc.select(("span[class=characteristic item-trigger-title]"));
  22. for (Element link : resulCharact ) {
  23. writeToFile("../upload/characteristic.txt", link.text()+ "n");
  24. }
  25. Elements resulRating = doc.select(("span[class=star-block stars-column]"));
  26. for (Element ratings : resulRating) {
  27. writeToFile("../upload/ratings.txt", ratings.text()+ "n");
  28.  
  29. }
Add Comment
Please, Sign In to add comment