Skip to content

Commit

Permalink
Merge pull request #92 from devopsgroup-io/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
stevebritton authored Nov 27, 2017
2 parents c0eecf1 + 3d98fec commit e51fa22
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ if( jQuery('video').length >0 ){
}
```

* SimpleCrawler TypeError: The header content contains invalid characters
* Try setting the acceptCookies option to false

```yml
sitecrawler_options:
acceptCookies: false
```
## Code of Conduct
Take a moment to read or [Code of Conduct](CODE_OF_CONDUCT.md)
Expand Down
12 changes: 10 additions & 2 deletions lib/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,16 @@ var Crawler = function(options) {

// check siteshooter config file for cache boolen option
if (this.options.sitecrawler.cache){
// cache results
this.crawler.cache = new SimpleCrawler.cache(process.cwd());

var self = this;

utils.checkDirectory(path.join(config.process.get('working_directory'), '.siteshooter'), function(){

utils.checkDirectory(path.join(config.process.get('working_directory'), '.siteshooter', 'cache'), function(){
// cache results
self.crawler.cache = new SimpleCrawler.cache(path.join(config.process.get('working_directory'), '.siteshooter', 'cache'));
});
});
}

// Treat self-signed SSL certificates as valid
Expand Down

0 comments on commit e51fa22

Please sign in to comment.