Skip to content

Commit

Permalink
Update scraper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jbm160 committed Dec 10, 2015
1 parent 88cf2b4 commit 42e7fc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scraper.php
Expand Up @@ -32,7 +32,11 @@ function getCategories($u){
}
$path .= trim(strrchr($breadcrumb->innertext,">"),"> ");
foreach ($d->find('div[id=ctl00_cphContent_gsaCatFacetContainer]')->find('div[class=S2refinementsContainer]')->children() as $div) {
$data = (trim(strstr($div->children(1)->innertext,"(",true)), $path, $baseurl . $div->children(1)->href);
$data = array(
trim(strstr($div->children(1)->innertext,"(",true)),
$path,
$baseurl . $div->children(1)->href
);
scraperwiki::save_sqlite(array('Name', 'Path', 'URL'), $data, 'Categories');
getCategories($baseurl . $div->children(1)->href);
}
Expand Down

0 comments on commit 42e7fc7

Please sign in to comment.