|
@@ -1,4 +1,40 @@
|
|
1
|
+import java.io.IOException;
|
|
2
|
+import java.util.Scanner;
|
|
3
|
+
|
|
4
|
+import org.jsoup.Connection;
|
|
5
|
+import org.jsoup.HttpStatusException;
|
|
6
|
+import org.jsoup.Jsoup;
|
|
7
|
+import org.jsoup.nodes.Document;
|
|
8
|
+
|
|
9
|
+import static org.jsoup.nodes.Document.OutputSettings.Syntax.html;
|
|
10
|
+
|
|
11
|
+
|
1
|
12
|
public class Fido {
|
2
|
13
|
|
3
|
|
- GO FIBND JSOUP LIBRARY.
|
|
14
|
+ public Fido(){}
|
|
15
|
+
|
|
16
|
+ public static void main(String[] args) throws IOException {
|
|
17
|
+ Fido puppy = new Fido();
|
|
18
|
+ String webPage = puppy.stringScan("Please Enter URL:");
|
|
19
|
+
|
|
20
|
+ try{
|
|
21
|
+ String html = Jsoup.connect(webPage).get().html();
|
|
22
|
+ System.out.println(html);
|
|
23
|
+ }
|
|
24
|
+ catch(HttpStatusException e) {
|
|
25
|
+
|
|
26
|
+ }
|
|
27
|
+ }
|
|
28
|
+
|
|
29
|
+ public String stringScan(String prompt){
|
|
30
|
+ Scanner stringIn = new Scanner(System.in);
|
|
31
|
+ System.out.println(prompt);
|
|
32
|
+ String userInput = stringIn.next();
|
|
33
|
+ String userInputFinal = userInput.toLowerCase();
|
|
34
|
+ return userInputFinal;
|
|
35
|
+ }
|
|
36
|
+
|
4
|
37
|
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|