Quote:
Originally Posted by doridori
you realize multiple tube sites have different layouts. your code failed. 
|
I'm going to give you a lesson in PHP, which is to explain what Killswitch probably does.
PHP Code:
$tubes = array('redtube', 'pornhub', 'whatever');
$scrape = new Whatever;
foreach ($tubes as $tube) {
$scrape->run($tube);
}
Then.
PHP Code:
class Whatever {
public function run($tube) {
$path = 'drivers/' . $tube . '.php';
require_once $path;
$obj = new $tube;
$this->data[$tube] = $obj->crawl();
}
}
Each individual driver would have the code necessary to scrape the "different layouts" you were speaking of. So, you should make sure you know what you're talking about when you laugh at someone for a method they use.