Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.net.*;
- import java.io.*;
- public class JGet {
- public static void main (String[] args) throws IOException {
- try {
- URL url = new URL("http://www.google.com");
- BufferedReader in =
- new BufferedReader(new InputStreamReader(url.openStream()));
- String str;
- while ((str = in.readLine()) != null) {
- System.out.println(str);
- }
- in.close();
- }
- catch (MalformedURLException e) {}
- catch (IOException e) {}
- }
- }
- import urllib
- print urllib.urlopen('http://www.google.com').read()
Add Comment
Please, Sign In to add comment