forked from HelloWorld521/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5729d4c
commit 049a5ad
Showing
66 changed files
with
176,808 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
### 什么是网络爬虫? | ||
#### 维基百科 | ||
>**[网络爬虫](https://zh.wikipedia.org/wiki/%E7%B6%B2%E8%B7%AF%E7%88%AC%E8%9F%B2)**(英语:**web crawler**),也叫网络蜘蛛(spider),是一种用来自动浏览万维网的网络机器人。其目的一般为编纂网络索引。 | ||
#### 百度百科 | ||
>**网络爬虫**(又被称为网页蜘蛛,网络机器人,在FOAF社区中间,更经常的称为网页追逐者),是一种按照一定的规则,自动地抓取万维网信息的程序或者脚本。另外一些不常使用的名字还有蚂蚁、自动索引、模拟程序或者蠕虫。 | ||
### java网络爬虫练习项目 | ||
一个比较简单的java练习项目。 | ||
#### 需要知识 | ||
* 什么是网络爬虫 | ||
* Java基础 | ||
* 正则表达式 | ||
|
||
#### 项目思路 | ||
在[慕课网](http://www.imooc.com/wenda)的猿问页面,寻找一个你喜欢的问题页面,利用http请求获取问题页面的源码,然后通过正则表达式,不断爬取相关问题页面。 | ||
|
||
#### 项目介绍 | ||
该项目存在三个类 | ||
`Imooc.java :` `imooc问题bean类` | ||
`Spider.java:` `封装用来爬取页面的方法类` | ||
`Main.java:` `运行起始页面` | ||
|
||
* Imooc.java类是要爬取内容的对象类,属性成员有问题,问题链接,问题描述,答案列表和下一个问题链接。 | ||
* Spider.java类封装了2个可能用到的方法,getSource方法获取网页源代码和getImoocPage获取页面Url列表。 | ||
|
||
#### 项目源码 | ||
IMOOCSpider项目已上传到我的github上----[传送门](https://github.com/HelloWorld521/Java.git) | ||
欢迎Star | ||
|
||
下载下来后导入eclipse即可运行。 | ||
|
||
#### 项目运行结果 | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# Java | ||
|
||
## 项目介绍 | ||
## 项目介绍 | ||
|
||
本项目是个人的一些java项目练习源码,分享给大家,希望可以和大家一起进步! | ||
|
||
## Java项目实例 | ||
|
||
* JspChat jsp聊天室 | ||
* [JspChat jsp聊天室](./JspChat/) | ||
|
||
* tomcatServlet3.0 Web服务器 | ||
* [tomcatServlet3.0 Web服务器](./tomcatServlet3/) | ||
|
||
* Woss2.0 电信采集系统 | ||
* [Woss2.0 电信采集系统](./woss/) | ||
|
||
* eStore 图书管理系统 | ||
* [eStore 图书管理系统](./estore/) | ||
|
||
* [checkcode Java制作验证码](checkcode/README.md) | ||
* [checkcode Java制作验证码](./checkcode/) | ||
|
||
* [IMOOCSpider 简易网络爬虫](./IMOOCSpider/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## 介绍 | ||
本项目模仿tomcat,封装request和response,帮助理解tomcat源码。 | ||
|
||
|
||
|
||
|
||
## 需要知识 | ||
|
||
* 了解http协议 | ||
* java多线程和网络编程 | ||
|
||
|
||
## 源码 | ||
见本项目 | ||
|
||
|
||
## 收获 | ||
使用Java模拟浏览器发送请求给服务器,服务器接受请求并相应,锻炼java知识,帮助理解http协议和tomcat工作原理。 | ||
|
||
Please feel free to contact us with any questions you may have. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8"/> | ||
<classpathentry kind="lib" path="jar/dom4j-1.6.1.jar"/> | ||
<classpathentry kind="lib" path="jar/log4j-1.2.11.jar"/> | ||
<classpathentry kind="lib" path="jar/ojdbc5.jar"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
line.separator=\r\n |
6 changes: 3 additions & 3 deletions
6
woss2.0/.settings/org.eclipse.jdt.core.prefs → woss/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.8 | ||
org.eclipse.jdt.core.compiler.source=1.7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.