thp / urlwatch

Watch (parts of) webpages and get notified when something changes via e-mail, on your phone or via other means. Highly configurable.
https://thp.io/2008/urlwatch/
Other
2.81k stars 352 forks source link

Documentation example for Github tags stopped working. #723

Closed mercurytoxic closed 1 year ago

mercurytoxic commented 1 year ago

In the documentation

in the section "Watching Github releases and Gitlab tags"

This is the corresponding version for Github tags:

url: https://github.com/thp/urlwatch/tags
filter:
  - xpath: (//div[contains(@class,"commit js-details-container Details")]//h4//a)[1]
  - html2text
  - strip

Stopped working for me a couple days ago. I assume there was a change to the structure of the site:

I fixed Github tags with this filter instead, this will give you the latest/top-most tag as result:

url: https://github.com/thp/urlwatch/tags
filter:
- xpath:
    path: //*[@class="Link--primary"]
    maxitems: 1
- html2text:

It also works for Github releases, which will include the latest/top-most release or pre-release:

url: https://github.com/Novik/ruTorrent/releases
filter:
- xpath:
    path: //*[@class="Link--primary"]
    maxitems: 1
- html2text:

If you only want to monitor the latest release and not include pre-releases:

url: https://github.com/Novik/ruTorrent/releases/latest
filter:
- xpath: //*[@class="ml-1"]
- html2text:
- strip

Thanks for a wonderful tool.

thp commented 1 year ago

Cool, do you want to create a PR against the documentation?

bokkabonga commented 1 year ago
url: https://github.com/Novik/ruTorrent/releases/latest
filter:
- xpath: //*[@class="ml-1"]
- html2text:
- strip

This doesn´t work for me. The one including pre-releases works fine however! Thanks for providing a solution :)

thp commented 1 year ago

Updated the documentation, thanks!

bokkabonga commented 1 year ago

Hi,

not sure if I should open a new issue for this. So I just commented here.

Two of the examples stopped working again, since the class name has slightly changed. "Link--primary" to "Link--primary Link".

Github tags

url: https://github.com/thp/urlwatch/tags
filter:
- xpath:
    path: //*[@class="Link--primary Link"]
    maxitems: 1
- html2text:

Github releases, including Prereleases

url: https://github.com/Novik/ruTorrent/releases
filter:
- xpath:
    path: //*[@class="Link--primary Link"]
    maxitems: 1
- html2text:
thp commented 1 year ago

not sure if I should open a new issue for this. So I just commented here.

Two of the examples stopped working again, since the class name has slightly changed. "Link--primary" to "Link--primary Link".

Updated docs with the new filters. Thanks!