Comments (4)
In the https://github.com/Felix83000/Watcher/blob/master/Watcher/Watcher/site_monitoring/core.py
Instead of using a lot of If cases you could use something like.
def create_alert(id, site, new_ip, new_ip_second, score):
...
ALERT = {
1:message_ip,
2:message_ip,
3:message_ips,
4:message_web,
5:message_web_ip,
6:message_web_ip,
7:message_web_ip,
8:message_mail
9:message_mail_ip,
10:message_mail_ip,
11:message_mail_ip,
12:message_mail_web,
13:message_mail_ip_web,
14:message_mail_ip_web,
15:message_mail_ip_web,
}
if site.monitored:
type_ = ALERT[id]
try:
new_alert = Alert.objects.create(site=site,
type=type_,
new_ip=new_ip or None,
new_ip_second=new_ip_second or None,
old_ip=site.ip or None,
old_ip_second=site.ip_second or None)
...
except Exception:
...
what do you think?
from watcher.
Thank you for your support! 💯
-
The project is compatible with latest
Docker
&docker-compose
version (We will add this to the documentation). -
We will consider to change
core.py
byservices.py
. -
We are not only saving
TrendyWord
. We save source post urls related to eachTrendyWord
. In fact, when you click on a newTrendyWord
you have direct access to the source posts where theTrendyWord
was found by Watcher. -
Rss-Bridge is, by default, configured with Twitter only, but users can use it for all other sources like:
Facebook
,DuckDuckGo
,GoogleSearch
...- To do such you need to add the new bridge needed in the
Watcher/Rss-bridge/whitelist.txt
file (We will add more documentation on that).
- To do such you need to add the new bridge needed in the
-
We have planned to add a default RTIR number.
Expiry Date
is not mandatory when you add a new DNS to monitoring.
-
We have planned to add screenshot support in the future. Thanks for the link to Splash. 👍
- We are already monitoring website content with TLSH which is a fuzzy hash algorithm.
Thanks for your contribution mate.
This helps!
from watcher.
I could but the Exception handling is not very clear maybe it's better if you push this improvement.
from watcher.
Great idea! May you pull request your work?
Thanks 👍
from watcher.
Related Issues (20)
- Bad Request (400)
- [Improvements] SMTP auth/TLS? HOT 2
- Scrape error Watcher HOT 10
- Unknown
- Cannot create super user HOT 3
- searx dontainer restart always HOT 4
- Word Cloud and Trendy Words are not populating HOT 2
- [Improvements] Data Leak Keywords - RegEX support
- Error response from daemon: pull access denied for searx/searx-checker, repository does not exist HOT 2
- searx-checker: The image for the service you're trying to recreate has been removed. HOT 2
- Monitoring certificate SSL request (certstream) HOT 1
- Watcher does not respond to the configuration change for the host address in the .env file. HOT 1
- Twitter Feeds are no longer actualised using latest docker build HOT 1
- Question: Monitor for information leaks -> what sources? HOT 3
- Question: Move to 7/7 days and 24/24h HOT 2
- [ Feature request ] Add THE_HIVE_VERIFY_SSL HOT 1
- MySQLdb._exceptions.OperationalError: Illegal mix of collations HOT 6
- Mastodon support HOT 3
- Monitor products or companies HOT 1
- Twitter feeds stopped working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watcher.