mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-07-02 02:46:40 +00:00
fiex 4 and 10, sorting csv's now and making sure the origin of duplication is always local instance if compared
This commit is contained in:
parent
50f6a637cd
commit
d78ed2bc86
5 changed files with 43 additions and 15 deletions
|
@ -69,6 +69,8 @@ def clean_csv(df, blacklist):
|
|||
|
||||
try:
|
||||
if not df.empty:
|
||||
df = utils.sort_instances(df, 'Instance', conf.LOCAL_INSTANCE)
|
||||
|
||||
df = utils.remove_duplications(df)
|
||||
|
||||
df = df[~df.apply(lambda row: any(word in str(value) for word in blacklist for value in row), axis=1)]
|
||||
|
|
|
@ -15,10 +15,8 @@ def run_option_4():
|
|||
utils.print_colors("4) Synchronize new links from new or existing webring participants, into your local csv files")
|
||||
|
||||
utils.print_colors('[+] Syncing official webrings to local webrings')
|
||||
|
||||
current_instance = utils.get_current_instance()
|
||||
|
||||
webring_df = utils.get_local_webring_participants(current_instance)
|
||||
webring_df = utils.get_local_webring_participants(conf.LOCAL_INSTANCE)
|
||||
|
||||
utils.print_colors('[+] Reading local blacklist and sensitive words')
|
||||
local_blacklist_df = utils.get_local_blacklist()
|
||||
|
@ -27,13 +25,9 @@ def run_option_4():
|
|||
utils.print_colors('[+] Reading local verified and unverified')
|
||||
local_verified_df, local_unverified_df = utils.get_local_verified_and_unverified()
|
||||
|
||||
#Remove all rows
|
||||
local_unverified_df = utils.renew_csv(local_unverified_df, current_instance)
|
||||
local_verified_df = utils.renew_csv(local_verified_df, current_instance)
|
||||
|
||||
for participant in webring_df.itertuples(index=False, name='columns'):
|
||||
# Check if the participant is my instance
|
||||
if current_instance in participant:
|
||||
if conf.LOCAL_INSTANCE in participant:
|
||||
continue
|
||||
|
||||
if participant.Blacklisted == 'YES':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue