Ahmad Rusdi 6 年前
父节点
当前提交
a3b9a1bc2f
共有 8 个文件被更改,包括 24 次插入32 次删除
  1. 0
    15
      .idea/ZCW-Fido-URLFetch.iml
  2. 0
    3
      .idea/compiler.xml
  3. 4
    1
      .idea/misc.xml
  4. 0
    8
      .idea/modules.xml
  5. 1
    1
      .idea/vcs.xml
  6. 9
    0
      pom.xml
  7. 10
    4
      src/main/java/Main.java
  8. 二进制
      target/classes/Main.class

+ 0
- 15
.idea/ZCW-Fido-URLFetch.iml 查看文件

@@ -1,15 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
4
-    <output url="file://$MODULE_DIR$/target/classes" />
5
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
-    <content url="file://$MODULE_DIR$">
7
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10
-      <excludeFolder url="file://$MODULE_DIR$/target" />
11
-    </content>
12
-    <orderEntry type="inheritedJdk" />
13
-    <orderEntry type="sourceFolder" forTests="false" />
14
-  </component>
15
-</module>

+ 0
- 3
.idea/compiler.xml 查看文件

@@ -9,8 +9,5 @@
9 9
         <module name="ZCW-Fido-URLFetch" />
10 10
       </profile>
11 11
     </annotationProcessing>
12
-    <bytecodeTargetLevel>
13
-      <module name="ZCW-Fido-URLFetch" target="1.8" />
14
-    </bytecodeTargetLevel>
15 12
   </component>
16 13
 </project>

+ 4
- 1
.idea/misc.xml 查看文件

@@ -1,5 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
3 4
   <component name="MavenProjectsManager">
4 5
     <option name="originalFiles">
5 6
       <list>
@@ -7,5 +8,7 @@
7 8
       </list>
8 9
     </option>
9 10
   </component>
10
-  <component name="ProjectRootManager" version="2" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
11
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
12
+    <output url="file://$PROJECT_DIR$/out" />
13
+  </component>
11 14
 </project>

+ 0
- 8
.idea/modules.xml 查看文件

@@ -1,8 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="ProjectModuleManager">
4
-    <modules>
5
-      <module fileurl="file://$PROJECT_DIR$/.idea/ZCW-Fido-URLFetch.iml" filepath="$PROJECT_DIR$/.idea/ZCW-Fido-URLFetch.iml" />
6
-    </modules>
7
-  </component>
8
-</project>

+ 1
- 1
.idea/vcs.xml 查看文件

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3 3
   <component name="VcsDirectoryMappings">
4
-    <mapping directory="" vcs="Git" />
4
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
5 5
   </component>
6 6
 </project>

+ 9
- 0
pom.xml 查看文件

@@ -19,5 +19,14 @@
19 19
             </plugin>
20 20
         </plugins>
21 21
     </build>
22
+
23
+    <dependencies>
24
+        <!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
25
+        <dependency>
26
+            <groupId>org.jsoup</groupId>
27
+            <artifactId>jsoup</artifactId>
28
+            <version>1.11.3</version>
29
+        </dependency>
30
+    </dependencies>
22 31
     
23 32
 </project>

+ 10
- 4
src/main/java/Main.java 查看文件

@@ -1,7 +1,13 @@
1
+import org.jsoup.Jsoup;
2
+import org.jsoup.nodes.Document;
3
+
4
+import java.io.IOException;
5
+import java.util.Scanner;
6
+
1 7
 public class Main {
2
-    public static void main(String[] args) {
3
-        //ask for a url
4
-        // fetch the url
5
-        // print the url
8
+    public static void main(String[] args) throws IOException {
9
+        System.out.println("Enter URL name: \n");
10
+        Document doc = Jsoup.connect(new Scanner(System.in).nextLine()).get();
11
+        System.out.println(doc);
6 12
     }
7 13
 }

二进制
target/classes/Main.class 查看文件