Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong entries saving for social and top category #7

Merged
merged 1 commit into from
May 17, 2023
Merged
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
Binary file modified statistics.db
Binary file not shown.
4 changes: 2 additions & 2 deletions utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def save_res_to_db(db_name: str,

# ↓ ca entries ↓ self-signed entries ↓ other ssl entries
gov_entries = [','.join(entries[0][0]), ','.join(entries[0][1]), ','.join(entries[0][2])]
social_entries = [','.join(entries[1][0]), ','.join(entries[1][1]), ','.join(entries[2][2])]
social_entries = [','.join(entries[1][0]), ','.join(entries[1][1]), ','.join(entries[1][2])]
top_entries = [','.join(entries[2][0]), ','.join(entries[2][1]), ','.join(entries[2][2])]

# Add entries to database
Expand All @@ -99,7 +99,7 @@ def save_res_to_db(db_name: str,
get_lines_count_in(path.join(dataset_folder, 'social.txt')),
social_entries[0], social_entries[1], social_entries[2],
get_lines_count_in(path.join(dataset_folder, 'top-100.txt')),
top_entries[1], top_entries[1], top_entries[2],
top_entries[0], top_entries[1], top_entries[2],
int(is_new_dataset == 'True' or is_new_dataset == 'true')))
connection.commit()
except sqlite3.Error as e:
Expand Down