Description: Fork of web label applet : https://store.kde.org/p/1830364
Widget that search regularly text from a web page and show a color (green, orange, red) depending on the information finded. The displayed color choice is tuned by regular expression defined into the configuration panel. A notification can be displayed with zenity for the color orange and red with a custom message. To select text you want to display, specify a page URL, a CSS text selector, and a refresh interval in widget's settings. This applet is usefull today in France to watch potential electric shutdown and to be alert before it happens.
REQUIREMENTS
For the widget to work, it needs Python with the Beautiful Soup library and zenity for notification. To install it, run a command: Ubuntu/Debian: $ sudo apt install python3-bs4 zenity openSUSE: $ sudo zypper in python3-beautifulsoup4 zenity Arch: $ sudo pacman -S python-beautifulsoup4 zenity Fedora: $ sudo dnf install python-beautifulsoup4 zenity
USAGE
1) Open the page you want to get data from in a browser. 2) Use the page inspector to select the element you want and copy its CSS path. 3) In the widget's settings, enter the page URL and the CSS selector. You can optionally set a title and a custom data refresh interval. 4) Configure regexp, colors, and text for notification.
CAVEATS
Please note that not all pages can be used. Some important exceptions: • pages that require authorization to access the data (e.g. social networks); • pages that use JavaScript do dynamically load content.
Also note that the selector might break over time as the page changes its structure or the data is moved elsewhere.
Ratings & Comments
1 Comment
10 Cool!