Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.net.*;
- import java.io.*;
- import java.util.StringTokenizer;
- import java.util.Scanner;
- public class Main {
- public void HtmlCookie() throws Exception {
- URL url = new URL("https://www.google.kz/");
- HttpURLConnection connection = (HttpURLConnection) url.openConnection();
- connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6");
- connection.setRequestProperty("Cookie", "uname=AQAAANCMnd8BFdERjHoAwE%2fCl%2bsBAAAAdEBpNRprKkuhk%2fnIwaLLPgQAAAACAAAAAAADZgAAqAAAABAAAADZqjhvec%2bV30HPxZ7khpUvAAAAAASAAACgAAAAEAAAAEQ9EI8%2bQHNdK8RjqtcJRrYgAAAAIbTnx5Q0HjHreoZn8Q5TIVluiwUapbiqYZY%2fdYYzC84UAAAApN%2bIOFgfcLv7r%2fLO3wV4hPG%2f%2bOM%3d;");
- connection.connect();
- String inputLine;
- Scanner in = new Scanner(new InputStreamReader(connection.getInputStream(), "UTF8"));
- //public String st[] = new String[400000];
- int y=0;
- while(in.hasNextLine()) {
- inputLine = in.nextLine();
- //System.out.println(inputLine);
- work p = new work(inputLine);
- p.work();
- //st[y]+=p.show();
- y++;
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement