Skip to content

Commit 3b04c67

Browse files
Minor changes, added .json files extraction
1 parent f44fb7b commit 3b04c67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pagesearch/pagesearch_parsers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ def subdomains_parser(subdomains_list, report_folder, keywords, keywords_flag):
125125
with open(extracted_path, 'wb') as file:
126126
file.write(response.content)
127127
print(Fore.GREEN + "File was successfully saved")
128-
elif href and href.lower().endswith(('.rtf')):
128+
elif href and href.lower().endswith(('.json')):
129129
filename = os.path.basename(href)
130-
extracted_path = os.path.join(ps_docs_path, f"extracted_{os.path.splitext(filename)[0]}.rtf")
130+
extracted_path = os.path.join(ps_docs_path, f"extracted_{os.path.splitext(filename)[0]}.json")
131131
with open(extracted_path, 'wb') as file:
132132
file.write(response.content)
133133
print(Fore.GREEN + "File was successfully saved")
@@ -144,8 +144,8 @@ def subdomains_parser(subdomains_list, report_folder, keywords, keywords_flag):
144144
pass
145145
ps_emails_list = [x for x in total_emails if x]
146146
ps_emails_return = [', '.join(sublist) for sublist in ps_emails_list]
147-
#print(ps_emails_return)
148147
clean_bad_pdfs(ps_docs_path)
148+
149149
if keywords_flag == 1:
150150
print(Fore.GREEN + "Starting keywords searching in PDF files" + Style.RESET_ALL)
151151
try:

0 commit comments

Comments
 (0)