トピックの次のページを取得しようとしていますが、エラーが発生します。その年齢のトピック内の次のページをスクレイピングできるように、そのエラーを回避する方法はありますか? (次のページは 20 で、その後は 40 など) エラーは以下に示されています。誰かが私にコードを掲載するように要求することは確かですが、どれだけ、またはどのコードを掲載すればよいかわかりません。
http://blah.com/quotes/topic/age 20 1 1http://blah.com/quotes/topic/age/20
Fatal error: Call to a member function find() on a non-object in /Users/blah/Sites/simple_html_dom.php on line 879
アップデート***
これは870-885の間の線です
function save($filepath='') {
$ret = $this->root->innertext();
if ($filepath!=='') file_put_contents($filepath, $ret, LOCK_EX);
return $ret;
}
// find dom node by css selector
// Paperg - allow us to specify that we want case insensitive testing of the value of the selector.
function find($selector, $idx=null, $lowercase=false) {
return $this->root->find($selector, $idx, $lowercase);
}
// clean up memory due to php5 circular references memory leak...
function clear() {
foreach ($this->nodes as $n) {$n->clear(); $n = null;}