public static void crawl(WebGraph webs, InvertedIndex words)
	{

		String url = URL_START;
		webs.addPage(new WebNode(url));
		WebNode node = webs.getNextUnVisitedPage();
		do
		{
			url = node.getUrl().toExternalForm();
			words.addURL(url);
			node.flipVisited();
			String page = words.getHtmlPage(url);
			int startIndex = page.indexOf("href=\"/wiki/");

			while (startIndex != -1)
			{
				int endIndex = getHrefEndIndex(page, startIndex);
				String neighbourUrl = URL_BASE + page.substring(startIndex + 6, endIndex);

				if (neighbourUrl.charAt(neighbourUrl.length() - 4) != '.')
				{
					if (webs.getPages().size() <= MIN_WEB_PAGES)
					{
						WebNode neighbourNode = new WebNode(neighbourUrl);
						node.addLink(neighbourNode);
						webs.addPage(neighbourNode);
					}
					else
					{
						WebNode neighbourNode = webs.getPage(neighbourUrl);
						if (neighbourNode != null)
						{
							node.addLink(neighbourNode);
						}
					}

				}

				page = page.substring(endIndex + 1);
				startIndex = page.indexOf("href=\"/wiki/");
			}

			node = webs.getNextUnVisitedPage();
		} while (node != null);

	}