mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 12:16:57 +00:00
fix option 4 (when empty filtered dataframe it was failing)
This commit is contained in:
parent
64e703ad47
commit
57f53c95ea
1 changed files with 13 additions and 10 deletions
|
@ -253,7 +253,7 @@ Maintenance:
|
|||
print_colors(f"{uvdf[['Name','URL']]}")
|
||||
while(IsNameValid(name) is not True):
|
||||
name = input("What is the Website name you want to Trust ? (ex: Nowhere)")
|
||||
filter_uvdf = uvdf[uvdf.Name.str.contains(name)]
|
||||
filter_uvdf = uvdf[uvdf.Name.str.contains(name,na=False)]
|
||||
# display only the matching entries in unverified.csv in an array format (display it in CLI).
|
||||
print_colors(f"{filter_uvdf[['Name','URL']]}")
|
||||
# check if there are no results, dont proceed if there are none!
|
||||
|
@ -295,7 +295,7 @@ Maintenance:
|
|||
print_colors(f"{vdf[['Name','URL']]}")
|
||||
while(IsNameValid(name) is not True):
|
||||
name = input("What is the Website name you want to Untrust ? (ex: BreachForums)")
|
||||
filter_vdf = vdf[vdf.Name.str.contains(name)]
|
||||
filter_vdf = vdf[vdf.Name.str.contains(name,na=False)]
|
||||
# display only the matching entries in unverified.csv in an array format (display it in CLI).
|
||||
print_colors(f"{filter_vdf[['Name','URL']]}")
|
||||
# check if there are no results, dont proceed if there are none!
|
||||
|
@ -331,8 +331,8 @@ Maintenance:
|
|||
print_colors(f"{vdf[['Name','URL']]}")
|
||||
while(IsNameValid(name) is not True):
|
||||
name = input("What is the Website name you want to Blacklist ? (ex: BreachForums)")
|
||||
filter_uvdf = uvdf[uvdf.Name.str.contains(name)]
|
||||
filter_vdf = vdf[vdf.Name.str.contains(name)]
|
||||
filter_uvdf = uvdf[uvdf.Name.str.contains(name,na=False)]
|
||||
filter_vdf = vdf[vdf.Name.str.contains(name,na=False)]
|
||||
|
||||
if filter_vdf.size == 0 and filter_uvdf.size == 0 :
|
||||
print_colors("ERROR no results, skipping.",is_error=True)
|
||||
|
@ -409,7 +409,7 @@ Maintenance:
|
|||
print_colors(f"{vdf[['Name','URL']]}")
|
||||
while(IsNameValid(name) is not True):
|
||||
name = input("What is the Website name you want to edit ? (ex: BreachForums)")
|
||||
filter_vdf = vdf[vdf.Name.str.contains(name)]
|
||||
filter_vdf = vdf[vdf.Name.str.contains(name,na=False)]
|
||||
if filter_vdf.size != 0 :
|
||||
print_colors(f"{filter_vdf[['Name','URL']]}")
|
||||
# check if website name exists in verified.csv, if yes ask the user what index should be blacklisted
|
||||
|
@ -455,7 +455,7 @@ Maintenance:
|
|||
print_colors(f"{uvdf[['Name','URL']]}")
|
||||
while(IsNameValid(name) is not True):
|
||||
name = input("What is the Website name you want to edit? (ex: BreachForums)")
|
||||
filter_uvdf = uvdf[uvdf.Name.str.contains(name)]
|
||||
filter_uvdf = uvdf[uvdf.Name.str.contains(name,na=False)]
|
||||
if filter_uvdf.size != 0 :
|
||||
print_colors(f"{filter_uvdf[['Name','URL']]}")
|
||||
# check if website name exists in unverified.csv, if yes ask the user what index should be blacklisted
|
||||
|
@ -577,7 +577,7 @@ Maintenance:
|
|||
|
||||
# check if the participant is already listed in webring-participants.csv or not, and add them if not already listed
|
||||
# and display only the matching entries in unverified.csv in an array format (display it in CLI).
|
||||
filter_wdf = wdf[wdf.URL.str.contains(participant)]
|
||||
filter_wdf = wdf[wdf.URL.str.contains(participant,na=False)]
|
||||
# check if there are no results, dont proceed if there are none!
|
||||
if filter_wdf.size == 0: #skip if webring participant is already listed, otherwise proceed
|
||||
newrow=[name,participant,desc,trusted,status,score]
|
||||
|
@ -597,7 +597,7 @@ Maintenance:
|
|||
rows2delete= [] # it is an empty list at first
|
||||
for i,j in csvdf.iterrows():
|
||||
row=csvdf.loc[i,:].values.tolist()
|
||||
#print_colors(f"{row}")
|
||||
print_colors(f"{row}")
|
||||
|
||||
|
||||
|
||||
|
@ -638,8 +638,11 @@ Maintenance:
|
|||
# for each link in the participant's verified/unverified csv files,
|
||||
# check if the link is already listed in your own verified.csv or unverified.csv
|
||||
filterterm=csvdf.at[i, 'URL']
|
||||
filter_vdf= vdf[vdf.URL.str.contains(filterterm)]
|
||||
filter_uvdf= uvdf[uvdf.URL.str.contains(filterterm)]
|
||||
#print('1)',filterterm)
|
||||
filter_vdf= vdf[vdf.URL.str.contains(filterterm,na=False)]
|
||||
#print('2)',filter_vdf)
|
||||
#print('3)',uvdf[uvdf.URL.str.contains(filterterm,na=False)] )
|
||||
filter_uvdf= uvdf[uvdf.URL.str.contains(filterterm,na=False)]
|
||||
if len(filter_uvdf.index) == 0 and len(filter_vdf.index) == 0:
|
||||
newrow=row
|
||||
uvdf.loc[-1] = newrow # adding a row
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue