天天看點

CSDN Android用戶端開發(二):詳解如何基于Java用Jsoup爬蟲HTML資料一、建立org.yanzi.bean包,裡面有兩個java檔案二、建立org.yanzi.csdn包,這裡放三個java檔案三、包名org.yanzi.biz,其下隻有這個類,複雜完成真正的爬蟲工作,即從html string字元串裡提取出對應的新聞屬性,存到新聞bean裡

本文參考鴻洋大大的連結詳細介紹如何使用Jsoup包抓取HTML資料,是一個純java工程,并将其打包成jar包。希望了解如何用java語言爬蟲網頁的可以看下。

雜家前文就又介紹用HTTP通路百度首頁得到html的string字元串,但html的文本資料如果不經過處理就是個文本字元串沒有任何效果的。所謂的浏覽器就是負責将文本的html“翻譯”成看到的界面。在前文有介紹,這個csdn的用戶端app分首頁、業界、移動、研發、程式員、雲計算五大類。以業界為例,http://news.csdn.net/ 實際加上page1的http位址是:http://news.csdn.net/news/1

CSDN Android用戶端開發(二):詳解如何基于Java用Jsoup爬蟲HTML資料一、建立org.yanzi.bean包,裡面有兩個java檔案二、建立org.yanzi.csdn包,這裡放三個java檔案三、包名org.yanzi.biz,其下隻有這個類,複雜完成真正的爬蟲工作,即從html string字元串裡提取出對應的新聞屬性,存到新聞bean裡

從上圖可知,一個完整的新聞包含東西還是比較多的,将其抽象出來ID号、标題、連結、日期、圖檔連結、内容、類型,這7個屬性。

一、建立org.yanzi.bean包,裡面有兩個java檔案

NewsItem.java是上面具有7個屬性的新聞bean

package org.yanzi.bean;

public class NewsItem
{
	private int id;

	/**
	 * 标題
	 */
	private String title;
	/**
	 * 連結
	 */
	private String link;
	/**
	 * 釋出日期
	 */
	private String date;
	/**
	 * 圖檔的連結
	 */
	private String imgLink;
	/**
	 * 内容
	 */
	private String content;

	/**
	 * 類型  
	 * 
	 */
	private int newsType;

	public int getNewsType()
	{
		return newsType;
	}

	public void setNewsType(int newsType)
	{
		this.newsType = newsType;
	}

	public String getTitle()
	{
		return title;
	}

	public void setTitle(String title)
	{
		this.title = title;
	}

	public String getLink()
	{
		return link;
	}

	public void setLink(String link)
	{
		this.link = link;
	}

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public String getDate()
	{
		return date;
	}

	public void setDate(String date)
	{
		this.date = date;
	}

	public String getImgLink()
	{
		return imgLink;
	}

	public void setImgLink(String imgLink)
	{
		this.imgLink = imgLink;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	@Override
	public String toString()
	{
		return "NewsItem [id=" + id + ", title=" + title + ", link=" + link + ", date=" + date + ", imgLink=" + imgLink
				+ ", content=" + content + ", newsType=" + newsType + "]";
	}

}

           

CommonException.java 這個主要是抛出異常,友善構造

package org.yanzi.bean;

public class CommonException extends Exception
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public CommonException()
	{
		super();
		// TODO Auto-generated constructor stub
	}

	public CommonException(String message, Throwable cause)
	{
		super(message, cause);
		// TODO Auto-generated constructor stub
	}

	public CommonException(String message)
	{
		super(message);
		// TODO Auto-generated constructor stub
	}

	public CommonException(Throwable cause)
	{
		super(cause);
		// TODO Auto-generated constructor stub
	}
	
}

           

二、建立org.yanzi.csdn包,這裡放三個java檔案

Constant.java 這塊将其弄成interface比較奇怪哈,寫成class也ok

package org.yanzi.csdn;

public interface Constant
{
	public static final int NEWS_TYPE_YEJIE = 1; //業界
	public static final int NEWS_TYPE_YIDONG = 2; //移動
	public static final int NEWS_TYPE_YANFA = 3; //研發
	public static final int NEWS_TYPE_CHENGXUYUAN = 4;//程式員
	public static final int NEWS_TYPE_YUNJISUAN = 5; //雲計算
	

}

           

URLUtil.java 這個負責擷取到每個大類新聞的精确的url位址

package org.yanzi.csdn;


public class URLUtil
{


	public static final String NEWS_LIST_URL = "http://www.csdn.net/headlines.html";
	public static final String NEWS_LIST_URL_YIDONG = "http://mobile.csdn.net/mobile";
	public static final String NEWS_LIST_URL_YANFA = "http://sd.csdn.net/sd";
	public static final String NEWS_LIST_URL_YUNJISUAN = "http://cloud.csdn.net/cloud";
	public static final String NEWS_LIST_URL_ZAZHI = "http://programmer.csdn.net/programmer";
	public static final String NEWS_LIST_URL_YEJIE = "http://news.csdn.net/news";


	/**
	 * 根據文章類型,和目前頁碼生成url
	 * @param newsType
	 * @param currentPage
	 * @return
	 */
	public static String generateUrl(int newsType, int currentPage)
	{
		currentPage = currentPage > 0 ? currentPage : 1;
		String urlStr = "";
		switch (newsType)
		{
		case Constant.NEWS_TYPE_YEJIE:
			urlStr = NEWS_LIST_URL_YEJIE;
			break;
		case Constant.NEWS_TYPE_YANFA:
			urlStr = NEWS_LIST_URL_YANFA;
			break;
		case Constant.NEWS_TYPE_CHENGXUYUAN:
			urlStr = NEWS_LIST_URL_ZAZHI;
			break;
		case Constant.NEWS_TYPE_YUNJISUAN:
			urlStr = NEWS_LIST_URL_YUNJISUAN;
			break;
		default:
			urlStr = NEWS_LIST_URL_YIDONG;
			break;
		}


		urlStr += "/" + currentPage;
		
		return urlStr;


	}


}
           

DataUtil.java 利用HttpURLConnection 利用get方式擷取html的文本,也就是string類型的資料. 注意這個檔案跟上個檔案封裝上的松耦合性。

package org.yanzi.csdn;

import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

import org.yanzi.bean.CommonException;

public class DataUtil {
	/**
	 * 擷取HTML資料
	 * @param urlStr url位址
	 * @return
	 * @throws CommonException
	 */
	public static String doGet(String urlStr) throws CommonException{
		StringBuffer sb = new StringBuffer();
		try {
			URL url = new URL(urlStr);
			HttpURLConnection conn = (HttpURLConnection) url.openConnection();
			conn.setRequestMethod("GET");
			conn.setConnectTimeout(5000);
			conn.setDoInput(true);
			conn.setDoOutput(true);
			if(conn.getResponseCode() == 200){
				InputStream is = conn.getInputStream();
				int len = 0;
				byte[] buf = new byte[1024];
				while((len = is.read(buf)) != -1){
					sb.append(new String(buf, 0, len, "UTF-8"));
				}
				is.close();
			}else{
				throw new CommonException("通路網絡失敗00");
			}
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			throw new CommonException("通路網絡失敗11");
		}
		return sb.toString();
	}
}

           

三、包名org.yanzi.biz,其下隻有這個類,複雜完成真正的爬蟲工作,即從html string字元串裡提取出對應的新聞屬性,存到新聞bean裡

package org.yanzi.biz;

import java.util.ArrayList;
import java.util.List;


import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.yanzi.bean.CommonException;
import org.yanzi.bean.NewsItem;
import org.yanzi.csdn.DataUtil;
import org.yanzi.csdn.URLUtil;

/**
 * 處理NewItem的業務類
 * @author zhy
 * 
 */
public class NewsItemBiz
{
	/**
	 * 業界、移動、雲計算
	 * 
	 * @param htmlStr
	 * @return
	 * @throws CommonException 
	 */
	public List<NewsItem> getNewsItems( int newsType , int currentPage) throws CommonException
	{
		String urlStr = URLUtil.generateUrl(newsType, currentPage);
		
		String htmlStr = DataUtil.doGet(urlStr);
		
		List<NewsItem> newsItems = new ArrayList<NewsItem>();
		NewsItem newsItem = null;

		Document doc = Jsoup.parse(htmlStr);
		Elements units = doc.getElementsByClass("unit");
		for (int i = 0; i < units.size(); i++)
		{
			newsItem = new NewsItem();
			newsItem.setNewsType(newsType);

			Element unit_ele = units.get(i);

			Element h1_ele = unit_ele.getElementsByTag("h1").get(0);
			Element h1_a_ele = h1_ele.child(0);
			String title = h1_a_ele.text();
			String href = h1_a_ele.attr("href");

			newsItem.setLink(href);
			newsItem.setTitle(title);

			Element h4_ele = unit_ele.getElementsByTag("h4").get(0);
			Element ago_ele = h4_ele.getElementsByClass("ago").get(0);
			String date = ago_ele.text();

			newsItem.setDate(date);

			Element dl_ele = unit_ele.getElementsByTag("dl").get(0);// dl
			Element dt_ele = dl_ele.child(0);// dt
			try
			{// 可能沒有圖檔
				Element img_ele = dt_ele.child(0);
				String imgLink = img_ele.child(0).attr("src");
				newsItem.setImgLink(imgLink);
			} catch (IndexOutOfBoundsException e)
			{

			}
			Element content_ele = dl_ele.child(1);// dd
			String content = content_ele.text();
			newsItem.setContent(content);
			newsItems.add(newsItem);
		}

		return newsItems;

	}

}

           

注意這個檔案是真正的爬蟲的核心,說明如下:

1、要爬蟲一個html資料在之前可以使用HtmlParser,見連結http://www.cnblogs.com/loveyakamoz/archive/2011/07/27/2118937.html 但自從jsoup誕生後,使用比HtmlParser更方面。此處就是利用jsoup解析html的,需要加載lib檔案夾下的jsoup-1.7.2.jar、jsoup-1.7.2-sources.jar,自己add to build path即可。後者是源碼,可以檢視,真正的包就第一個。

2、jsoup可以直接打開一個網頁url,此處為了友善已經寫了從url擷取string類型的html代碼了。是以可以直接利用Document doc = Jsoup.parse(htmlStr); 得到Document類。

以業界新聞為例,http://news.csdn.net/news/1,按快捷鍵ctrl+u檢視其源碼,搜尋關鍵字unit可以看到:

CSDN Android用戶端開發(二):詳解如何基于Java用Jsoup爬蟲HTML資料一、建立org.yanzi.bean包,裡面有兩個java檔案二、建立org.yanzi.csdn包,這裡放三個java檔案三、包名org.yanzi.biz,其下隻有這個類,複雜完成真正的爬蟲工作,即從html string字元串裡提取出對應的新聞屬性,存到新聞bean裡

每一個新聞就是以關鍵字“unit”來辨別的,第一頁一共有10條新聞是以有10個unit。Elements units = doc.getElementsByClass("unit"); 得到這10個新聞item的集合。

3、接下來就是對一個新聞提取具體資訊了

先來看其中一個完整的新聞html代碼:

<div class="unit">

<h1><a href="http:www.csdn.net/article/2014-07-25/2820877" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" target="_blank" >微視、美拍等的春天,不是短視訊應用的春天</a></h1>

<h4>發表于<span class="ago">2014-07-25 16:52</span>|<span class="view_time">690次閱讀</span>|<span class="num_recom">6條評論</span></h4>

<dl>

<dt>

<a href="http:www.csdn.net/article/2014-07-25/2820877" target="_blank" rel="external nofollow" target="_blank" rel="external nofollow" target="_blank"><img src="http:cms.csdnimg.cn/article/201407/25/53d21abd54a77.jpg" alt="" /></a>

</dt>

<dd>微視、美拍等短視訊應用最近很火,它們都已經在App Store社交免費榜靠前。它們的流行,能證明短視訊應用的春天到了嗎?小謙認為,非也。隻有解決4G網絡問題、分享問題以及拍攝優化問題後,它的春天才會真正到來。</dd>

</dl>

<div class="tag"><a href="http:www.csdn.net/tag/%E5%B0%8F%E8%B0%A6/news" target="_blank" rel="external nofollow" target="_blank">小謙</a><a href="http:www.csdn.net/tag/%E5%BE%AE%E8%A7%86/news" target="_blank" rel="external nofollow" target="_blank">微視</a><a href="http:www.csdn.net/tag/%E7%A7%92%E6%8B%8D/news" target="_blank" rel="external nofollow" target="_blank">秒拍</a><a href="http:www.csdn.net/tag/%E7%BE%8E%E5%9B%BE%E7%A7%80%E7%A7%80/news" target="_blank" rel="external nofollow" target="_blank">美圖秀秀</a><a href="http:www.csdn.net/tag/%E7%BE%8E%E6%8B%8D/news" target="_blank" rel="external nofollow" target="_blank">美拍</a><a href="http:www.csdn.net/tag/%E5%BE%AE%E4%BF%A1/news" target="_blank" rel="external nofollow" target="_blank">微信</a><a href="http:www.csdn.net/tag/%E5%BA%94%E7%94%A8/news" target="_blank" rel="external nofollow" target="_blank">應用</a><a href="http:www.csdn.net/tag/%E7%9F%AD%E8%A7%86%E9%A2%91/news" target="_blank" rel="external nofollow" target="_blank">短視訊</a></div>

</div>

從html代碼上可以看到,新聞的标題是以<h1>辨別的,是以用Element h1_ele = unit_ele.getElementsByTag("h1").get(0);得到一個Element。此處get(0),是因為h1标簽的就有1個。

h1辨別裡的代碼是:

<a href="http://www.csdn.net/article/2014-07-30/2820930" target="_blank" >IDC:全球智能機出貨量漲23% 華為進前5且翻番</a>

是以通過 Element h1_a_ele = h1_ele.child(0);

String title = h1_a_ele.text();

String href = h1_a_ele.attr("href");

得到<a>标簽裡辨別的東西。通過:

String title = h1_a_ele.text();

String href = h1_a_ele.attr("href");

得到标題和連結。

接下來通過h4的tag找日期:

<h4>發表于<span class="ago">14小時前</span>|<span class="view_time">2944次閱讀</span>|<span class="num_recom">17條評論</span></h4>

通過class找到ago孩子,最終得到時間。

其他的都類似了,從中可以看出如果是根據html外圍的标簽,用getElementsByTag("h1").get(0),如果裡面包含的有class則要用getElementsByClass("ago").get(0)來進一步定位。如果沒有class,隻是普通的孩子,利用child(0)定位得到Element。

最後是測試代碼:

Test.java

package org.yanzi.test;

import java.util.List;

import org.yanzi.bean.CommonException;
import org.yanzi.bean.NewsItem;
import org.yanzi.biz.NewsItemBiz;
import org.yanzi.csdn.Constant;



public class Test
{

	public static void main(String[] args){
		Test test = new Test();
		test.test01();
	}
	
	@org.junit.Test
	public  void test01()
	{
		NewsItemBiz biz = new NewsItemBiz();
		int currentPage = 1;
		try
		{
			/**
			 * 業界
			 */
			System.out.println("-----------業界-----------");
			List<NewsItem> newsItems = biz.getNewsItems(Constant.NEWS_TYPE_YEJIE, currentPage);
			for (NewsItem item : newsItems)
			{
				System.out.println(item);
			}

			/**
			 * 程式員雜志
			 */
			System.out.println("-----------程式員-----------");
			newsItems = biz.getNewsItems(Constant.NEWS_TYPE_CHENGXUYUAN, currentPage);
			for (NewsItem item : newsItems)
			{
				System.out.println(item);
			}
			
			/**
			 * 研發
			 */
			System.out.println("-----------研發-----------");
			newsItems = biz.getNewsItems(Constant.NEWS_TYPE_YANFA, currentPage);
			for (NewsItem item : newsItems)
			{
				System.out.println(item);
			}
			
			
			/**
			 * 移動
			 */
			System.out.println("-------------移動---------");
			newsItems = biz.getNewsItems(Constant.NEWS_TYPE_YIDONG, currentPage);
			for (NewsItem item : newsItems)
			{
				System.out.println(item);
			}
			System.out.println("-------------結束---------");

		} catch (CommonException e)
		{
			e.printStackTrace();
		}
	}

}
           

運作結果:

-----------業界-----------
NewsItem [id=0, title=IDC:全球智能機出貨量漲23% 華為進前5且翻番, link=http://www.csdn.net/article/2014-07-30/2820930, date=15小時前, imgLink=http://cms.csdnimg.cn/article/201407/30/53d844474e279.jpg, content=IDC日前釋出了2014年第二季度全球智能手機市場相關的研究資料。資料顯示,位居全球智???手機出貨量前五的廠商分别是三星、蘋果、華為、聯想和LG。華為智能手機出貨量更是同比大漲了近一倍,而三星卻同比下降。, newsType=1]
NewsItem [id=0, title=專訪葉勁峰:漫談遊戲開發和遊戲優化, link=http://www.csdn.net/article/2014-07-30/2820931, date=15小時前, imgLink=http://cms.csdnimg.cn/article/201407/30/53d85983915fe.jpg, content=社群之星第50期采訪了騰訊互動娛樂研發部引擎技術中心專家工程師葉勁峰,他講述了譯著《遊戲引擎架構》經曆,并就遊戲引擎、優化、遊戲開發學習等進行了分享。與此同時,葉勁峰也将坐鎮社群問答第8期回答大家問題。, newsType=1]
NewsItem [id=0, title=修成正果:Mozilla正式任命Chris Beard為CEO, link=http://www.csdn.net/article/2014-07-29/2820918, date=2014-07-29 14:40, imgLink=http://cms.csdnimg.cn/article/201407/29/53d712420edcd.jpg, content=Mozilla正式任命臨時CEO Chris Beard為正式CEO,其于2004年加入Mozilla,随後一直負責産品、營銷、創新等方面的工作。後在風投公司擔任高管,在創新和企業管理方面積累了很多經驗。Beard被公認為最适合的CEO人選。, newsType=1]
NewsItem [id=0, title=蘋果和IBM成最佳搭檔 微軟谷歌或受威脅, link=http://www.csdn.net/article/2014-07-28/2820905-apple-ibm, date=2014-07-29 14:51, imgLink=http://cms.csdnimg.cn/article/201407/28/53d61d099020f.jpg, content=月中,蘋果宣布與IBM達成獨家合作協定,兩家合作在很大程度上是互補的,因為他們分别專注于消費者和企業市場,合作後必在企業級市場推出更強大的産品。同時,他們的發展也會對微軟、谷歌和黑莓等公司帶來不利影響。, newsType=1]
NewsItem [id=0, title=敢為人先:亞馬遜推出3D定制和銷售門戶網站, link=http://www.csdn.net/article/2014-07-29/2820911, date=2014-07-29 08:21, imgLink=http://cms.csdnimg.cn/article/201407/29/53d6e919d6e7e.jpg, content=線上零售商亞馬遜近日推出了一門戶網站,該網站是一個3D列印産品的銷售平台。使用者可以根據自己的喜好,比如材料、大小、樣式和顔色的個性化,來定制和購買3D産品。甚至隻要喜歡,還可以将照片或喜好的話定制上去。, newsType=1]
NewsItem [id=0, title=微軟中國遭工商總局調查 或因涉及“不公平交易”, link=http://www.csdn.net/article/2014-07-29/2820910, date=2014-07-29 07:47, imgLink=http://cms.csdnimg.cn/article/201407/29/53d6dcefe99e0.jpg, content=日前,國家工商總局相關人員突訪了微軟位??我國北京、上海、廣州和成都四地的辦公室,正就一些事情展開問詢,或因該公司涉及作業系統壟斷問題和賄賂官員以換取軟體合同等。, newsType=1]
NewsItem [id=0, title=傳智播客“2014年全國高校IT骨幹教師研修班”火熱開班, link=http://www.csdn.net/article/2014-07-28/2820886, date=2014-07-28 10:11, imgLink=http://cms.csdnimg.cn/article/201407/28/53d5b05190e1a_thumb.jpg, content=日前,由傳智播客主辦的“2014年全國高校IT骨幹教師研修班”火熱開班。本屆研修班吸引了來自全國30多所院校,近60名IT類專業教師參加。接下來将分Android、Java、PHP、網頁平面UI、.Net共5個班開展課程學習交流。, newsType=1]
NewsItem [id=0, title=【暢言】從程式員到架構師的方法與邏輯, link=http://www.csdn.net/article/2014-07-28/2820883, date=2014-07-28 08:51, imgLink=http://cms.csdnimg.cn/article/201407/28/53d59d5f7d4ca.jpg, content=架構師這個詞經常見到,很多人都冠着這個頭銜,實際上很多人對架構師究竟是幹什麼的都沒有統一的認識。V衆投發起人李智勇則利用特定場景進行分析,诠釋了架構師這個概念,并給出如何成為架構師方法。, newsType=1]
NewsItem [id=0, title=Windows Phone 8.1 Update 1:圖示可合并成檔案夾、4G語音通話, link=http://www.csdn.net/article/2014-07-28/2820882, date=2014-07-28 07:52, imgLink=http://cms.csdnimg.cn/article/201407/28/53d58fc0ef514.jpg, content=微軟終于計劃釋出已經進入RTM階段的Windows Phone 8.1Update 1(或GDR1),可能包括:對圖示進行拖拽以及合并成檔案夾、支援1280 x 800螢幕分辨率和7英寸的裝置、支援互動式的手機外殼(見上圖),以及4G語音通話。, newsType=1]
NewsItem [id=0, title=智能硬體生态未成,打造平台為時尚早, link=http://www.csdn.net/article/2014-07-28/2820881, date=2014-07-28 00:37, imgLink=null, content=目前的智能硬體産業發展是由創業公司探路,巨頭紛紛跟進打造開放平台。但智能硬體市場至今無标杆性産品、開發者及應用前景不明、尚未找到使用者“痛點”等特征表明市場仍處于萌芽階段,打造平台為時尚早。, newsType=1]
-----------程式員-----------
NewsItem [id=0, title=Server SAN:雲計算時代的弄潮兒, link=http://www.csdn.net/article/2014-07-28/2820902, date=2014-07-28 15:17, imgLink=http://cms.csdnimg.cn/article/201407/28/53d6087c3920e.jpg, content=Server SAN為何一時間能成為了高大上的東西?分布式存儲說來并不新奇,2000年諸如GPFS、Lustre、Panasas及PVFS就出現了,但之後發展不溫不火。說到底還是實際應用需求的推動,目前的繁榮源于資料在爆炸式增長。, newsType=4]
NewsItem [id=0, title=大資料 “在路上”, link=http://www.csdn.net/article/2014-07-25/2820859, date=2014-07-25 11:03, imgLink=http://cms.csdnimg.cn/article/201407/25/53d1cfb8a3844.jpg, content=未來的Google無人駕駛汽車,一定像是一個移動的資料中心,需要同時處理着結構化、非結構化的大量資料,彼時的Big Data才算是真正用于汽車。, newsType=4]
NewsItem [id=0, title=融合與統一:簡評OS X10.10 Yosemite, link=http://www.csdn.net/article/2014-07-21/2820768, date=2014-07-21 17:09, imgLink=http://cms.csdnimg.cn/article/201407/23/53cf2e9689263.jpg, content=蘋果旗下兩大系列作業系統OS X和iOS發展步調并不一緻。相對于iOS的迅猛發展,OS X顯得不溫不火。Yosemite的釋出,應該說是個裡程碑。本文基于Yosemite-Developer Preview 1.0版本簡單介???這個OS X家族的新成員。, newsType=4]
NewsItem [id=0, title=智能家居産品安全漫談, link=http://www.csdn.net/article/2014-07-21/2820748, date=2014-07-21 11:06, imgLink=http://cms.csdnimg.cn/article/201407/21/53cc8931b917b.jpg, content=移動網際網路技術的廣泛應用為智能家居産業的發展提供了必要條件,無論傳統巨頭還是新興創業公司都在投入這一領域,但随之而來的安全問題卻未引起足夠重視。, newsType=4]
NewsItem [id=0, title=可穿戴計算機改變資訊互動方式, link=http://www.csdn.net/article/2014-07-18/2820718, date=2014-07-18 09:51, imgLink=http://cms.csdnimg.cn/article/201407/18/53c8bf81c4723.jpg, content=可穿戴裝置幫助我們更友善地感覺和捕捉世界,并且,我們也在以新的方式進行感官交流。未來幾十年,可穿戴計算機将嵌入我們的衣服、珠寶甚至皮膚,而這将對人類資訊互動方式産生很大影響。, newsType=4]
NewsItem [id=0, title=高效能技術團隊的協同工具箱, link=http://www.csdn.net/article/2014-07-16/2820681, date=2014-07-16 13:30, imgLink=http://cms.csdnimg.cn/article/201407/16/53c6483a059be.jpg, content=使用适合團隊的協同工具,不但能使工作按預定成本如期順利推進,而且能實作對團隊成員、項目過程以及産品等的分析管理。未經調研就選擇别人認為好的工具,很可能遭遇“水土不服”。, newsType=4]
NewsItem [id=0, title=當虛拟照進現實——Oculus的世界夢, link=http://www.csdn.net/article/2014-07-14/2820639, date=2014-07-14 13:19, imgLink=http://cms.csdnimg.cn/article/201407/14/53c36d0be8cd1.jpg, content=專注虛拟現實裝置研發的Oculus被Facebook以20億美元收于麾下,Oculus公司創始人Palmer Luckey希望建立自己的虛拟現實硬體生産線,他還表示要從使用者的角度來不斷完善Rift,未來是屬于使用者的,而不僅僅是Oculus。, newsType=4]
NewsItem [id=0, title=在動态網絡下實作分布式共享存儲, link=http://www.csdn.net/article/2014-07-09/2820585-implementing-distributed-shared-memory-for-dynamic-networks, date=2014-07-09 10:59, imgLink=http://cms.csdnimg.cn/article/201407/09/53bcddd2580b0.jpg, content=本文介紹了分布式環境下實作共享記憶體模型會遇到的各種問題和挑戰,并針對不同問題介紹多種算法的優劣性。本文是對現階段該領域研究現狀的總體介紹,通過本文能了解動态分布式共享記憶體研究的前沿狀況、挑戰與機遇。, newsType=4]
NewsItem [id=0, title=從Objective-C到Swift, link=http://www.csdn.net/article/2014-07-08/2820568, date=2014-07-08 11:22, imgLink=http://cms.csdnimg.cn/article/201407/09/53bcabb118d79.jpg, content=2014年WWDC大會,蘋果在毫無預兆的情況下釋出了Swift語言。Swift背後的概念大多與Objective-C類似,但更為簡潔、自然,也吸收了很多其他語言的文法。本文将對Swift的文法、特點及改進進行全面介紹。, newsType=4]
NewsItem [id=0, title=50年内有望實作的7大技術, link=http://www.csdn.net/article/2014-07-07/2820549, date=2014-07-07 10:43, imgLink=http://cms.csdnimg.cn/article/201407/07/53ba0dedb7494.jpg, content=1964年,美國電氣與電子工程學會IEEE雜志《IEEE Spectrum》剛成立時,一些預想家就曾預測過50年後的科技走勢,如今,這一切都發生了。現在又有一批預想家預測了未來50年的科技發展趨勢。, newsType=4]
-----------研發-----------
           

最後通過Export---Java---JAR file将其打包。

附個jsoup的相關連結:http://blog.csdn.net/yjflinchong/article/details/7743995

源碼下載下傳連結:http://download.csdn.net/detail/yanzi1225627/7697313