public void crawler()  	//抓取微博
	{
		init();
		Date lastestDate = lastTime;
		String urlsuffix = '/' + uid;
				
		for(;;)
		{
			try {
				Document page = PageFetcher.getPage(cookies, baseUrl + urlsuffix);   //获取页面
				List<Weibo> weibos = PageResolver.resolveUserPage(page, uid, screenName); //分析页面，得到微博
				if(weibos.isEmpty())
					break;
				Date currentPageTime = WeiboSaver.saveWeibos(weibos, lastTime);  //存储微博
				if(currentPageTime.after(lastestDate))
					lastestDate = currentPageTime;
				if(currentPageTime.before(lastTime))  //当前爬到的微博已经比上一次的要晚，退出
					break;
				urlsuffix = PageResolver.nextPageUrlSuffix(page); //下一页地址的后半部分
				if(urlsuffix == null)   //没有下一页
					break;
				try {
					Thread.sleep(WAIT_TIME);
				} catch (Exception e) {
					e.printStackTrace();
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
			
		}
		close(uid, new Date());
	}