src/curlient/crawler/PageCrawler.php
private function getMoreContent(Curlient $client, $content, $cfg, &$fields, $url, $gcfg) {
		$concat = isset($cfg['concat']) ? $cfg['concat'] : '';
		if (!$concat || !isset($fields[ $concat ])) {//未指定连接字段或连接字段不存在.
			return;
		}

		$concatStr = isset($cfg['concatStr']) ? $cfg['concatStr'] : '[:page:]';
		$grabber   = StringFilter::getInstance();
		if (isset($gcfg['interval'])) {
			$interval = intval($gcfg['interval']);
		} else {
			$interval = 0;
		}
		$links = [$url];
		while ($link = $this->getNextPageURL($content, $cfg, $url)) {
			if (in_array($link, $links)) {
				break;//一旦发现有重复，就退出不采集了。
			}
			$content = $this->getContent($link, $client, $cfg, $gcfg);
			if (!$content) {
				break;//采不到值了退出不采了
			}
			if (isset($cfg['json'])) {
				$content = @json_decode($content);
			} else if (isset($cfg['dom'])) {
				$content = new Crawler($content);
			}
			$val = $grabber->filter($content, $cfg['fields'][ $concat ]);
			if (!$val) {//采不到值了退出不采了
				break;
			}
			$fields[ $concat ] .= $concatStr . $val;
			$links []          = $link;
			if ($interval > 0) {
				sleep($interval);
			}
		}
		$this->pages = $links;
	}
private function getMoreContent(Curlient $client, $content, $cfg, &$fields, $url, $gcfg) {
		$concat = isset($cfg['concat']) ? $cfg['concat'] : '';
		if (!$concat || !isset($fields[ $concat ])) {//未指定连接字段或连接字段不存在.
			return;
		}

		$concatStr = isset($cfg['concatStr']) ? $cfg['concatStr'] : '[:page:]';
		$grabber   = StringFilter::getInstance();
		if (isset($gcfg['interval'])) {
			$interval = intval($gcfg['interval']);
		} else {
			$interval = 0;
		}
		$links = [$url];
		while ($link = $this->getNextPageURL($content, $cfg, $url)) {
			if (in_array($link, $links)) {
				break;//一旦发现有重复，就退出不采集了。
			}
			$content = $this->getContent($link, $client, $cfg, $gcfg);
			if (!$content) {
				break;//采不到值了退出不采了
			}
			if (isset($cfg['json'])) {
				$content = @json_decode($content);
			} else if (isset($cfg['dom'])) {
				$content = new Crawler($content);
			}
			$val = $grabber->filter($content, $cfg['fields'][ $concat ]);
			if (!$val) {//采不到值了退出不采了
				break;
			}
			$fields[ $concat ] .= $concatStr . $val;
			$links []          = $link;
			if ($interval > 0) {
				sleep($interval);
			}
		}
		$this->pages = $links;
	}
抓取更多页