GithubHelp home page GithubHelp logo

Comments (4)

danieleperera avatar danieleperera commented on August 17, 2024 2

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.

Felix83000 avatar Felix83000 commented on August 17, 2024 1

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 by services.py.

  • We are not only saving TrendyWord. We save source post urls related to each TrendyWord. In fact, when you click on a new TrendyWord you have direct access to the source posts where the TrendyWord 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).
  • 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.

danieleperera avatar danieleperera commented on August 17, 2024 1

I could but the Exception handling is not very clear maybe it's better if you push this improvement.

from watcher.

Felix83000 avatar Felix83000 commented on August 17, 2024

Great idea! May you pull request your work?
Thanks 👍

from watcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.