Skip to content

Commit

Permalink
Issue #69: Feature request: Check java script files for dirhunt (adde…
Browse files Browse the repository at this point in the history
…d js to must be downloaded files).
  • Loading branch information
Nekmo committed Oct 20, 2020
1 parent 1239675 commit 2346c53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dirhunt/crawler_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def maybe_rewrite(self):
def must_be_downloaded(self, response):
"""The file must be downloaded to obtain information.
"""
return self.maybe_directory() or (response.headers.get('Content-Type') in ['text/css'])
return self.maybe_directory() or (response.headers.get('Content-Type') in [
'text/css', 'application/javascript'
])

def maybe_directory(self):
return self.type not in ['asset', 'document', 'rewrite'] or self.type in ['directory']
Expand Down

0 comments on commit 2346c53

Please sign in to comment.