use cdx matchtype for domain and host

This commit is contained in:
Akash Mahanty
2021-01-10 11:10:49 +05:30
parent a6470b1036
commit 6c71dfbe41
3 changed files with 9 additions and 11 deletions

View File

@@ -298,16 +298,10 @@ class Url:
url_list = []
if subdomain:
url = "*.%s/*" % _cleaned_url(self.url)
cdx = Cdx(_cleaned_url(self.url), user_agent=self.user_agent, start_timestamp=start_timestamp, end_timestamp=end_timestamp, match_type="domain")
else:
url = "%s/*" % _cleaned_url(self.url)
cdx = Cdx(_cleaned_url(self.url), user_agent=self.user_agent, start_timestamp=start_timestamp, end_timestamp=end_timestamp, match_type="host")
cdx = Cdx(
url,
user_agent=self.user_agent,
start_timestamp=start_timestamp,
end_timestamp=end_timestamp,
)
snapshots = cdx.snapshots()
url_list = []