Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Wappalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _parse_html(self):
}

@classmethod
def new_from_url(cls, url, verify=True):
def new_from_url(cls, url, verify=True, custom_headers=None):
"""
Constructs a new WebPage object for the URL,
using the `requests` module to fetch the HTML.
Expand All @@ -75,8 +75,11 @@ def new_from_url(cls, url, verify=True):

url : str
verify: bool
custom_headers: dict
Dictionary that allow send custom headers on request
"""
response = requests.get(url, verify=verify, timeout=2.5)
response = requests.get(
url, headers=custom_headers, verify=verify, timeout=2.5)
return cls.new_from_response(response)

@classmethod
Expand Down
11 changes: 11 additions & 0 deletions bin/update_apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import requests

print('Beginning file apps.json download')

url = 'https://raw.githubusercontent.com/AliasIO/Wappalyzer/master/src/apps.json'
r = requests.get(url)

with open('../data/apps.json', 'wb') as f:
f.write(r.content)

print('File apps.json updated with success!')