Changeset - fcd16eecfcf4
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2011-02-09 00:03:21
ohnobinki@ohnopublishing.net
cedarville: Insert hack into crawler so that the few semesters it understands will be crawled properly.
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
school.d/cedarville.crawl.inc
Show inline comments
 
@@ -72,6 +72,11 @@ function cedarville_crawl(array &$semest
 
  if (!$content_div_dom)
 
    {
 
      fprintf(STDERR, "cedarville_crawl(): Error finding location of the list of departments.\n");
 
      if (count($semesters))
 
	{
 
	  fprintf(STDERR, "cedarville_crawl(): Assuming that I got enough info anyways, returning successful code so that the few semesters I was able to crawl will be cached.\n");
 
	  return 0;
 
	}
 
      return 1;
 
    }
 
  $departments_xpath = new DOMXPath($semesters_dom);
 
@@ -106,6 +111,11 @@ function cedarville_crawl(array &$semest
 
  if (!count($departments))
 
    {
 
      echo "cedarville_crawl(): Unable to get a listing of departments.\n";
 
      if (count($semesters))
 
	{
 
	  fprintf(STDERR, "cedarville_crawl(): Assuming that I got enough info anyways, returning successful code so that the few semesters I was able to crawl will be cached.\n");
 
	  return 0;
 
	}
 
      return 1;
 
    }
 
  /* find the first department whose name we don't yet know */
0 comments (0 inline, 0 general)