Skip to content

Commit

Permalink
Bug fixes csv Output
Browse files Browse the repository at this point in the history
  • Loading branch information
chrism01 committed Aug 6, 2024
1 parent 1e9212f commit 8478992
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion csv_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def write_rows_to_csv(prepared_output):
try:
with open(ABSOLUTE_FILE_PATH + OUTPUT_FILENAME, mode='w', newline='') as file:
writer = csv.writer(file, delimiter=",")

# Add header Row
# Define the headers for the CSV file
headers = ["URL", "MX Record", "SPF Record", "DKIM Record", "DMARC Record"]
writer.writerow(headers)
# Write the URL information to the CSV file
if len(prepared_output) > 1:
for url_info in prepared_output:
Expand Down
4 changes: 2 additions & 2 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def remove_new_line_char(domains):


def replace_characters(record_to_check):
char_to_replace = ","
new_char = ";"
char_to_replace = ";"
new_char = ","
# for record in record_to_check:
updated_string = record_to_check.replace(char_to_replace, new_char)
return updated_string

0 comments on commit 8478992

Please sign in to comment.