updated changes as per PR comments.

pull/1477/head
Sawan Mehta 2 years ago
parent ce4efb564d
commit 6554e25fe3

File diff suppressed because it is too large Load Diff

@ -556,7 +556,7 @@ def main():
action="store_true", default=False,
help="Force the use of the local data.json file.")
parser.add_argument("--nsfw", "-n",
parser.add_argument("--nsfw",
action="store_true", default=False,
help="Include checking of NSFW sites from default list. Default False")
@ -620,11 +620,7 @@ def main():
print(f"ERROR: {error}")
sys.exit(1)
print("")
if args.nsfw:
print("Including NSFW sites")
else:
print("Excluding NSFW sites")
if not args.nsfw:
sites.remove_nsfw_sites()
# Create original dictionary from SitesInformation() object.

@ -52,7 +52,6 @@ class SiteInformation:
self.username_claimed = username_claimed
self.username_unclaimed = username_unclaimed
self.information = information
self.is_nsfw = is_nsfw
return
@ -185,7 +184,12 @@ class SitesInformation:
Return Value:
None
"""
self.sites = {site:self.sites[site] for site in self.sites if not self.sites[site].is_nsfw }
sites = {}
for site in self.sites:
if self.sites[site].is_nsfw:
continue
sites[site] = self.sites[site]
self.sites = sites
def site_name_list(self):
"""Get Site Name List.

Loading…
Cancel
Save