Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bda-research/node-crawler
Browse files Browse the repository at this point in the history
  • Loading branch information
mike442144 committed Dec 5, 2017
2 parents e3bcb87 + 81ca9e4 commit 46d933f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file added crawler_primary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion lib/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ Crawler.prototype._onContent = function _onContent (error, options, response) {
return options.callback(null,response,options.release);
}

if (!options.html && !typeis(contentType(response), ['html','xhtml'])){
var injectableTypes = ['html','xhtml','text/xml', 'application/xml', '+xml'];
if (!options.html && !typeis(contentType(response), injectableTypes)){
log("warn","response body is not HTML, skip injecting. Set jQuery to false to suppress this message");
return options.callback(null,response,options.release);
}
Expand Down

0 comments on commit 46d933f

Please sign in to comment.