Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWorld521 committed Mar 25, 2017
1 parent 5729d4c commit 049a5ad
Show file tree
Hide file tree
Showing 66 changed files with 176,808 additions and 11 deletions.
35 changes: 35 additions & 0 deletions IMOOCSpider/readme.md
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即可运行。

#### 项目运行结果

![结果.png](./woss/src/images/result.png)
12 changes: 6 additions & 6 deletions README.md
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/)
20 changes: 20 additions & 0 deletions tomcatServer3.0/readme.md
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.
5 changes: 4 additions & 1 deletion woss2.0/.classpath → woss/.classpath
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>
2 changes: 1 addition & 1 deletion woss2.0/.project → woss/.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>woss2.0</name>
<name>woss</name>
<comment></comment>
<projects>
</projects>
Expand Down
2 changes: 2 additions & 0 deletions woss/.settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
2 changes: 2 additions & 0 deletions woss/.settings/org.eclipse.core.runtime.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
line.separator=\r\n
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 added woss/bin/com.zip
Binary file not shown.
Binary file added woss/bin/com/briup/client/Client.class
Binary file not shown.
Binary file added woss/bin/com/briup/client/Gather.class
Binary file not shown.
Binary file added woss/bin/com/briup/client/imp/ClientImp.class
Binary file not shown.
Binary file added woss/bin/com/briup/client/imp/GatherImp.class
Binary file not shown.
Binary file added woss/bin/com/briup/common/Backup.class
Binary file not shown.
Binary file added woss/bin/com/briup/common/Configuration.class
Binary file not shown.
Binary file added woss/bin/com/briup/common/ConfigurationAWare.class
Binary file not shown.
Binary file added woss/bin/com/briup/common/DBUtils.class
Binary file not shown.
Binary file added woss/bin/com/briup/common/Log.class
Binary file not shown.
Binary file added woss/bin/com/briup/common/WossModule.class
Binary file not shown.
Binary file added woss/bin/com/briup/common/imp/BackupImp.class
Binary file not shown.
Binary file not shown.
Binary file added woss/bin/com/briup/common/imp/LogImp.class
Binary file not shown.
Loading

0 comments on commit 049a5ad

Please sign in to comment.