Skip to content

Commit

Permalink
Update scraper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mycwnet committed Sep 26, 2018
1 parent b6d40ac commit c822611
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scraper.php
Expand Up @@ -12,12 +12,11 @@
$dom->load($html);

$movies=$dom->find('.titleColumn');
$ids=[];
foreach($dom->find('td.titleColumn') as $movie) {

preg_match('#.*?([1-9][0-9]{0,2})\..*?<a.*?\/title\/(.+?)\/.*#', $movie->innertext, $match);

scraperwiki::save_sqlite(['rank','imdb_id'],['rank'=>$match[1],'imdb_id'=>$match[2]]);
scraperwiki::save_sqlite(['imdb_id'],['rank'=>$match[1],'imdb_id'=>$match[2]]);
}

?>

0 comments on commit c822611

Please sign in to comment.