Guest User

Untitled

a guest
Oct 28th, 2016
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. package instagramPicture;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.File;
  5. import java.io.FileReader;
  6. import java.io.IOException;
  7. import java.net.URL;
  8. import java.util.HashSet;
  9. import java.util.Scanner;
  10.  
  11. import org.jsoup.Jsoup;
  12. import org.jsoup.nodes.Document;
  13. import org.jsoup.nodes.Element;
  14. import org.jsoup.select.Elements;
  15.  
  16. public class sberB {
  17.  
  18. public static void main(String[] args) throws IOException {
  19. for(int i = 0;i<1000000000;i++){
  20.  
  21. String s = "https://vk.com/doc24139971_" + Integer.toString(i);
  22. URL url = new URL(s);
  23. Scanner scn = new Scanner(url.openStream());
  24. String z = "";
  25. while(scn.hasNextLine()){
  26. z = z + scn.nextLine();
  27. }
  28. String c = "true";
  29. if(z.contains("Ошибка")){
  30. c = "false";
  31. System.out.println(c);
  32. }else{
  33. System.out.println(c);
  34. }
  35. if(c.equals("true")){
  36. System.out.println(s);
  37. break;
  38. }
  39. }
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment