RogEE / Scraper

A plugin for ExpressionEngine 2.x — Easily fetch and output HTML content from remote sites.
0 stars 0 forks source link

Fatal error: Call to a member function find() on a non-object #1

Open denishmorinski opened 7 years ago

denishmorinski commented 7 years ago

Hello,

I have a problem with scraper. sometimes when I refresh page or when I navigate on diferent site's pages I get an error

Fatal error: Call to a member function find() on a non-object in /home/database/public_html/webpage.com/systemxtr/expressionengine/third_party/scraper/libraries/simplehtmldom/simple_html_dom.php on line 1129

The problem is in the next function, but I haven't menaged to resolve the problem

 function find($selector, $idx=null, $lowercase=false) { return $this->root->find($selector, $idx, $lowercase); }


Example of code where I am using scraper inside my templates:

{exp:scraper url="http://www.webpage/export" selector=".box"} {find selector="#montazne-slika-na-boxovima"}{innertext}{/find} {/exp:scraper}


Version of EE is: v2.10.1 - Build: 20150501 - © Copyright 2003 - 2017

Can you please help me to resolve this problem.

michaelrog commented 7 years ago

Hi Denis — Could you let me know the version of PHP and Scraper you're using?

dhmorinski commented 7 years ago

PHP version is 5.4, and Scraper version is 1.1.1.