You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pywhat only uses regular expressions to identify stuff. However, we may often want to update the description based on a match or to filter out false positives.
Some examples:
Pinging URLs to check if it is responding or if a certain resource exists, etc.
I think the best idea would be to write a class for every regex pattern (so that it can save the state between several matches). That class should have a method like process() that gets a match object and can alter it and return it or return None to filter it out.
Example:
classURLProcessor:
defprocess(match):
if"http://trashurl.it"inmatch["url"]: # Or maybe we should create an actual Match class and do match.urlreturnNone
The text was updated successfully, but these errors were encountered:
Currently, pywhat only uses regular expressions to identify stuff. However, we may often want to update the description based on a match or to filter out false positives.
Some examples:
1637093119.558717
toNovember 16, 2021 8:05:19 PM
)How it should be implemented?
I think the best idea would be to write a class for every regex pattern (so that it can save the state between several matches). That class should have a method like
process()
that gets a match object and can alter it and return it or return None to filter it out.Example:
The text was updated successfully, but these errors were encountered: