monitor-utils


Namemonitor-utils JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/centroid457/
Summarymonotir exact data (urlTag/Email) and alert on changes by email/telegram (threading)
upload_time2023-10-12 17:40:58
maintainer
docs_urlNone
authorAndrei Starichenko
requires_python>=3.6
license
keywords monitor changes monitor data url changes url tag changes url monitor imap changes email changes imap monitor email monitor alerts notifications email alerts telegram alerts
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # monitor_utils

## IMPORTANT!
NOT ALL WEBSITES WORKS! Sportmaster/Acra-rating/...

## INSPIRATION
Suppose you wish to give blood to the Center.
So nowadays you need to make an appointment by website, BUT you can't do this while the Center actually don't need your group.
Group necessity shown on Center website and called DonorSvetofor.
And as result you need monitoring it manually, because there are no news, email notifications, subscriptions.
It's not difficult but if you do it as day routine (even once a day) its quite distracting.

So I created it first as Monitor_DonorSvetofor


## Features
1. Threading each monitor
2. monitor 
   * website data changes
      * tag text
      * tag attribute
   * email received with subject (by regexp) in exact folder
3. Email/Telegram alert if
   * monitored data changed (from last state)
   * html structure was changed so parsing can't be finished
   * url became unreachable


## License
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).


## Release history
See the [HISTORY.md](HISTORY.md) file for release history.


## Installation
```commandline
pip install monitor-utils
```

## Import
```python
from monitor_utils import *
```


## GUIDE
See tests and source for other examples.

### 1. change or apply auth private data (see `private_values`)

### 2. create new desired class for your purpose
See [monitor_url_tag__implements.py](monitor_utils%2Fmonitor_url_tag__implements.py) for examples.

#### MonitorUrlTag
```python
from monitor_utils import *

class Monitor_CbrKeyRate(MonitorUrlTag):
    """
    MONITOR CentralBankRussia KeyRate

    # STRUCTURE to find -------------------------------------
<div class="table-wrapper">
  <div class="table-caption gray">% годовых</div>
  <div class="table">
    <table class="data">
      <tr>
        <th>Дата</th>
        <th>Ставка</th>
      </tr>
      <tr>
        <td>17.08.2023</td>
        <td>12,00</td>
      </tr>
      <tr>
        <td>16.08.2023</td>
        <td>12,00</td>
      </tr>
      <tr>
        <td>15.08.2023</td>
        <td>12,00</td>
      </tr>
      <tr>
        <td>14.08.2023</td>
        <td>8,50</td>
      </tr>
      <tr>
        <td>11.08.2023</td>
        <td>8,50</td>
      </tr>
      <tr>
        <td>10.08.2023</td>
        <td>8,50</td>
      </tr>
    </table>
  </div>
  <div class="table-caption">
    <p>
	  Данные доступны с  17.09.2013 по 17.08.2023.
	  </p>
  </div>
</div>
    """
    URL = "https://cbr.ru/hd_base/KeyRate/"
    TAG_CHAINS = [
        TagAddressChain("div", {"class": "table-wrapper"}, None, 0),
        TagAddressChain("td", {}, None, 1),
    ]
    TAG_GET_ATTR = None
    value_last = "12,00"
```

#### MonitorImap
see source

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/centroid457/",
    "name": "monitor-utils",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "monitor changes,monitor data,url changes,url tag changes,url monitor,imap changes,email changes,imap monitor,email monitor,alerts,notifications,email alerts,telegram alerts",
    "author": "Andrei Starichenko",
    "author_email": "centroid@mail.ru",
    "download_url": "https://files.pythonhosted.org/packages/83/70/e50441112452874614ae97a3bcbaa2e1acce86ba666bccd6b1afc9796901/monitor_utils-0.0.4.tar.gz",
    "platform": null,
    "description": "# monitor_utils\r\n\r\n## IMPORTANT!\r\nNOT ALL WEBSITES WORKS! Sportmaster/Acra-rating/...\r\n\r\n## INSPIRATION\r\nSuppose you wish to give blood to the Center.\r\nSo nowadays you need to make an appointment by website, BUT you can't do this while the Center actually don't need your group.\r\nGroup necessity shown on Center website and called DonorSvetofor.\r\nAnd as result you need monitoring it manually, because there are no news, email notifications, subscriptions.\r\nIt's not difficult but if you do it as day routine (even once a day) its quite distracting.\r\n\r\nSo I created it first as Monitor_DonorSvetofor\r\n\r\n\r\n## Features\r\n1. Threading each monitor\r\n2. monitor \r\n   * website data changes\r\n      * tag text\r\n      * tag attribute\r\n   * email received with subject (by regexp) in exact folder\r\n3. Email/Telegram alert if\r\n   * monitored data changed (from last state)\r\n   * html structure was changed so parsing can't be finished\r\n   * url became unreachable\r\n\r\n\r\n## License\r\nSee the [LICENSE](LICENSE) file for license rights and limitations (MIT).\r\n\r\n\r\n## Release history\r\nSee the [HISTORY.md](HISTORY.md) file for release history.\r\n\r\n\r\n## Installation\r\n```commandline\r\npip install monitor-utils\r\n```\r\n\r\n## Import\r\n```python\r\nfrom monitor_utils import *\r\n```\r\n\r\n\r\n## GUIDE\r\nSee tests and source for other examples.\r\n\r\n### 1. change or apply auth private data (see `private_values`)\r\n\r\n### 2. create new desired class for your purpose\r\nSee [monitor_url_tag__implements.py](monitor_utils%2Fmonitor_url_tag__implements.py) for examples.\r\n\r\n#### MonitorUrlTag\r\n```python\r\nfrom monitor_utils import *\r\n\r\nclass Monitor_CbrKeyRate(MonitorUrlTag):\r\n    \"\"\"\r\n    MONITOR CentralBankRussia KeyRate\r\n\r\n    # STRUCTURE to find -------------------------------------\r\n<div class=\"table-wrapper\">\r\n  <div class=\"table-caption gray\">% \u0420\u0456\u0420\u0455\u0420\u0491\u0420\u0455\u0420\u0406\u0421\u2039\u0421\u2026</div>\r\n  <div class=\"table\">\r\n    <table class=\"data\">\r\n      <tr>\r\n        <th>\u0420\u201d\u0420\u00b0\u0421\u201a\u0420\u00b0</th>\r\n        <th>\u0420\u040e\u0421\u201a\u0420\u00b0\u0420\u0406\u0420\u0454\u0420\u00b0</th>\r\n      </tr>\r\n      <tr>\r\n        <td>17.08.2023</td>\r\n        <td>12,00</td>\r\n      </tr>\r\n      <tr>\r\n        <td>16.08.2023</td>\r\n        <td>12,00</td>\r\n      </tr>\r\n      <tr>\r\n        <td>15.08.2023</td>\r\n        <td>12,00</td>\r\n      </tr>\r\n      <tr>\r\n        <td>14.08.2023</td>\r\n        <td>8,50</td>\r\n      </tr>\r\n      <tr>\r\n        <td>11.08.2023</td>\r\n        <td>8,50</td>\r\n      </tr>\r\n      <tr>\r\n        <td>10.08.2023</td>\r\n        <td>8,50</td>\r\n      </tr>\r\n    </table>\r\n  </div>\r\n  <div class=\"table-caption\">\r\n    <p>\r\n\t  \u0420\u201d\u0420\u00b0\u0420\u0405\u0420\u0405\u0421\u2039\u0420\u00b5 \u0420\u0491\u0420\u0455\u0421\u0403\u0421\u201a\u0421\u0453\u0420\u0457\u0420\u0405\u0421\u2039 \u0421\u0403  17.09.2013 \u0420\u0457\u0420\u0455 17.08.2023.\r\n\t  </p>\r\n  </div>\r\n</div>\r\n    \"\"\"\r\n    URL = \"https://cbr.ru/hd_base/KeyRate/\"\r\n    TAG_CHAINS = [\r\n        TagAddressChain(\"div\", {\"class\": \"table-wrapper\"}, None, 0),\r\n        TagAddressChain(\"td\", {}, None, 1),\r\n    ]\r\n    TAG_GET_ATTR = None\r\n    value_last = \"12,00\"\r\n```\r\n\r\n#### MonitorImap\r\nsee source\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "monotir exact data (urlTag/Email) and alert on changes by email/telegram (threading)",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "https://github.com/centroid457/",
        "Source": "https://github.com/centroid457/monitor_utils"
    },
    "split_keywords": [
        "monitor changes",
        "monitor data",
        "url changes",
        "url tag changes",
        "url monitor",
        "imap changes",
        "email changes",
        "imap monitor",
        "email monitor",
        "alerts",
        "notifications",
        "email alerts",
        "telegram alerts"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c1b73ca3000c5e5dcba6103009f1b439c91102619df993b93e2cfac5df9f835",
                "md5": "e129e68654246b514760844a3129deb6",
                "sha256": "356e261ff18d77bf1535bd29d73dd75a97f83afd327596e658213746d55baa61"
            },
            "downloads": -1,
            "filename": "monitor_utils-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e129e68654246b514760844a3129deb6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11126,
            "upload_time": "2023-10-12T17:40:57",
            "upload_time_iso_8601": "2023-10-12T17:40:57.015828Z",
            "url": "https://files.pythonhosted.org/packages/7c/1b/73ca3000c5e5dcba6103009f1b439c91102619df993b93e2cfac5df9f835/monitor_utils-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8370e50441112452874614ae97a3bcbaa2e1acce86ba666bccd6b1afc9796901",
                "md5": "50f9dceccdd530fe226f783328a22f4b",
                "sha256": "77f8f7f71a895710149cdacf3b717ccc9c8ff9d3bd88f920be0ba462588f54ee"
            },
            "downloads": -1,
            "filename": "monitor_utils-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "50f9dceccdd530fe226f783328a22f4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11012,
            "upload_time": "2023-10-12T17:40:58",
            "upload_time_iso_8601": "2023-10-12T17:40:58.685922Z",
            "url": "https://files.pythonhosted.org/packages/83/70/e50441112452874614ae97a3bcbaa2e1acce86ba666bccd6b1afc9796901/monitor_utils-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-12 17:40:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "centroid457",
    "github_project": "monitor_utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "monitor-utils"
}
        
Elapsed time: 0.12134s