zzzfelix / wbmalert Goto Github PK
View Code? Open in Web Editor NEWTakes a list of websites, makes a request to each website every 30 seconds, and plays a notification sound when the contents of a website have changed.
License: MIT License
Takes a list of websites, makes a request to each website every 30 seconds, and plays a notification sound when the contents of a website have changed.
License: MIT License
The script currently makes use of github.com/faiface/beep
to play a notification sound.
To reduce external dependencies, the library could be reduced with something else. All it needs to do is get the user's attention. A full blown audio library might be overkill.
The success.mp3
file is embedded but not used for playback in sound_darwin.go
. Sound only plays when the file exists in the current path lol.
In case of an error, the snapshot updates with the string error
. The alert is fired when the error occurs and it fires again when it doesn't occur anymore. This results in two, unnecessary success notifications. Errors should be either ignored or result in a different notification.
Get "https://www.wbm.de/wohnungen-berlin/angebote/": net/http: TLS handshake timeout
An error occurred! The website could not be reached!
========= WBM =========
Content changed: https://www.wbm.de/wohnungen-berlin/angebote/
=======================
The script uses github.com/microcosm-cc/bluemonday
to sanitize the retrieved HTML. This is only done because some websites contain generated strings/tokens (e.g. for Google Analytics or as references to dynamically created JS/CSS) that need to be removed.
To reduce external dependencies, an internal solution to remove these strings is required. Doesn't have to be HTML sanitation.
The configuration (websites, interval) is currently hard-coded in the go program code. This could be in an external file.
Currently, sound only works on macOS. It's implemented using the operating system's afplay
command. I would prefer not to pull in any libraries.
configuration.json
should allow for a regular expression that removes those partsFor:
Currently, sound only works on macOS. It's implemented using the operating system's afplay
command. Linux has a similar aplay
command. I would prefer not to pull in any libraries.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.