diff --git a/classes/robot/crawler.php b/classes/robot/crawler.php index 1547fa3..b116465 100644 --- a/classes/robot/crawler.php +++ b/classes/robot/crawler.php @@ -1090,7 +1090,12 @@ private static function determine_filesize($curlhandle, $method, $success, $body public function scrape($url) { global $CFG; - $cookiefilelocation = $CFG->dataroot . '/tool_crawler_cookies.txt'; + + static $cookiefilelocaion = ''; + if (!$cookiefilelocation) { + $cookiefilelocation = make_request_directory() . '/tool_crawler_cookies.txt'; + } + $config = self::get_config(); $version = moodle_major_version();