1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-04 03:48:55 +02:00

update urlwatch

This commit is contained in:
kev 2019-05-02 20:22:32 +08:00
parent 01bc6ecd52
commit cc2f7f4854
3 changed files with 52 additions and 5 deletions

View File

@ -23,6 +23,7 @@ RUN set -xe \
minidb \
pyyaml \
requests \
urlwatch \
&& apk del build-base \
libffi-dev \
libxml2-dev \

View File

@ -10,7 +10,42 @@ urlwatch:
image: vimagick/urlwatch
volumes:
- ./data:/root/.urlwatch
restart: always
restart: unless-stopped
```
## urls.yaml
```yaml
---
url: "https://github.com/thp/urlwatch/releases/latest"
filter:
- xpath: '(//div[contains(@class,"release-timeline-tags")]//h4)[1]/a'
- html2text: re
---
url: "https://github.com/shadowsocks/shadowsocks-libev/releases/latest"
filter:
- css: 'div.f1>a'
- html2text: re
...
```
## up and running
```bash
$ docker-compose up -d
$ docker-compose exec urlwatch sh
>>> urlwatch --test-slack
Successfully sent message to Slack
>>> urlwatch --list
1: https://github.com/thp/urlwatch/releases/latest
2: https://github.com/shadowsocks/shadowsocks-libev/releases/latest
>>> urlwatch --test-filter 2
v3.2.5
>>> exit
```
[1]: https://thp.io/2008/urlwatch/

View File

@ -1,4 +1,15 @@
- url: "https://github.com/thp/urlwatch/releases/latest"
filter:
- xpath: '(//div[contains(@class,"release-timeline-tags")]//h4)[1]/a'
- html2text: re
---
url: "https://github.com/thp/urlwatch/releases/latest"
filter:
- xpath: '(//div[contains(@class,"release-timeline-tags")]//h4)[1]/a'
- html2text: re
---
url: "https://github.com/shadowsocks/shadowsocks-libev/releases/latest"
filter:
- css: 'div.f1>a'
- html2text: re
...