Welcome Guest, Not a member yet? Register   Sign In
Error: Unable to load the requested driver: CI_Scraper_site_indeed
#1

I am trying to get a web scraper working on php codeigniter project and I am getting the error mentioned below. I checked and have the drivers in my libraries folder. The code for the scraper in library is provided below as well as an image to help understand the layout of the project. Let me know if any further information is needed and I apologize in advance if this is a basic question as I am new to codeigniter and this forum and have been stuck on this for a while. Any help would be appreciated.

The error I get is:
Code:
Unable to load the requested driver: CI_Scraper_site_indeed
The controller function that is causing the error when executed is:
Code:
class Profile extends CI_Controller {

public function __construct()
{
    parent::__construct();
    $this->load->helper('url');
    $this->load->helper('download');
    $this->load->library('form_validation');
    $this->load->library('table');
    $this->load->model('searches_model');
    $this->searches = $this->searches_model->get_searches();
    $this->sites = $this->searches_model->get_sites();
    $this->load->driver('scraper', array_column($this->sites, 'driver'));
    //check auth
    if (!is_admin() && !is_user()) {
        redirect(base_url());
    }
}

public function execute($search_id)
{
    $search = $this->searches_model->get_search($search_id);
    $this->form_validation->set_rules('search[url]', 'Search URL', 'required');
    if ($this->form_validation->run())
    {
        $search['url'] = $this->input->post('search[url]', true);
        $output = $this->scraper->scrape($search['url'], $search['driver']);
        force_download($search['name'] . '.csv', $output);
    }
    $data = array(
        'subview' => 'search_execute_view',
        'sites' => $this->sites,
        'searches' => $this->searches,
        'search' => $search
    );
    $data['main_content'] = $this->load->view('admin/scraper/search_execute_view', $data, TRUE);
    $this->load->view('admin/index', $data);
}

}

The Layout of the project libraries are:
[Image: WXDBD.png]
The contents of the libraries folder is the same as here:
https://github.com/RobertHallsey/search-scraper
Reply




Theme © iAndrew 2016 - Forum software by © MyBB