-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix previous filters overall changes for user name selection
- Loading branch information
1 parent
ede63d7
commit fefe083
Showing
10 changed files
with
230 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
other filters | ||
""" | ||
|
||
import logging | ||
|
||
import ofscraper.utils.args as args_ | ||
|
||
|
||
def otherFilters(filterusername): | ||
log = logging.getLogger("shared") | ||
|
||
log.debug(f"Last Seen After Filter: {args_.getargs().last_seen_after}") | ||
if args_.getargs().last_seen_after: | ||
filterusername = list( | ||
filter( | ||
lambda x: x.final_last_seen >= args_.getargs().last_seen_after, | ||
filterusername, | ||
) | ||
) | ||
log.debug(f"last seen after username count: {len(filterusername)}") | ||
log.debug(f"Last Seen Before Filter: {args_.getargs().last_seen_before}") | ||
if args_.getargs().last_seen_before: | ||
filterusername = list( | ||
filter( | ||
lambda x: x.final_last_seen <= args_.getargs().last_seen_before, | ||
filterusername, | ||
) | ||
) | ||
log.debug(f"last seen befpre username count: {len(filterusername)}") | ||
log.debug(f"Excluded usernames: {args_.getargs().excluded_username}") | ||
if len(args_.getargs().excluded_username) > 0: | ||
filterusername = list( | ||
filter( | ||
lambda x: x.name not in args_.getargs().excluded_username, | ||
filterusername, | ||
) | ||
) | ||
|
||
return filterusername |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.